Fig for shadcn/ui

Fig is a shadcn/ui theme built around a vivid deep teal primary color (#0d7266) with vivid deep blue accents (#0d4c72). The light mode uses a neutral background (#f8fbfb). Dark mode keeps the vivid deep teal primary (#0d7266) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8fbfbghostwhite
#000000black
Foreground
#031110black
#fcfdfdwhite
Card
#f5faf9mintcream
#030303black
Card foreground
#020d0cblack
#ffffffwhite
Popover
#f5faf9mintcream
#030303black
Popover foreground
#020d0cblack
#ffffffwhite
Primary
#0d7266teal
#0d7266teal
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#0d7234forestgreen
#0d7234forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e8f2echoneydew
#0d1711black
Muted foreground
#587463dimgray
#8ba796darkseagreen
Accent
#0d4c72darkslategray
#0d4c72darkslategray
Accent foreground
#bbe0f7powderblue
#bbe0f7powderblue
Destructive
#bf1108firebrick
#f74036tomato
Destructive foreground
#fffafasnow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0d7266teal
#0d7266teal

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background18.55:1AAA
Text on card18.66:1AAA
Primary button5.79:1AA
Secondary button6.03:1AA
Muted text4.48:1AA Large
Accent6.62:1AA
Destructive6.15:1AA
Dark mode
Text on background20.60:1AAA
Text on card20.67:1AAA
Primary button5.79:1AA
Secondary button6.03:1AA
Muted text7.04:1AAA
Accent6.62:1AA
Destructive3.66:1AA Large

CSS variables

Paste this into your globals.css to use Fig in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.003 188.831);
  --foreground: oklch(0.164 0.022 186.335);
  --muted: oklch(0.952 0.013 159.165);
  --muted-foreground: oklch(0.532 0.043 157.507);
  --popover: oklch(0.98 0.005 188.791);
  --popover-foreground: oklch(0.146 0.019 187.367);
  --card: oklch(0.98 0.005 188.791);
  --card-foreground: oklch(0.146 0.019 187.367);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.497 0.086 182.27);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.485 0.129 149.847);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.398 0.088 242.44);
  --accent-foreground: oklch(0.887 0.051 235.431);
  --destructive: oklch(0.51 0.202 29.491);
  --destructive-foreground: oklch(0.989 0.005 20.95);
  --ring: oklch(0.497 0.086 182.27);
  --chart-1: oklch(0.497 0.086 182.27);
  --chart-2: oklch(0.485 0.129 149.847);
  --chart-3: oklch(0.398 0.088 242.44);
  --chart-4: oklch(0.525 0.141 149.692);
  --chart-5: oklch(0.503 0.087 182.061);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 188.889);
  --muted: oklch(0.191 0.019 157.058);
  --muted-foreground: oklch(0.702 0.041 158.108);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.497 0.086 182.27);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.485 0.129 149.847);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.398 0.088 242.44);
  --accent-foreground: oklch(0.887 0.051 235.431);
  --destructive: oklch(0.644 0.22 28.161);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.497 0.086 182.27);
  --chart-1: oklch(0.497 0.086 182.27);
  --chart-2: oklch(0.485 0.129 149.847);
  --chart-3: oklch(0.398 0.088 242.44);
  --chart-4: oklch(0.525 0.141 149.692);
  --chart-5: oklch(0.503 0.087 182.061);
}