Herb for shadcn/ui

Herb is a shadcn/ui theme built around a muted yellow primary color (#848551) with muted purple accents (#855184). The light mode uses a neutral background (#fcfcf8). Dark mode keeps the muted yellow primary (#848551) on a yellow-tinted background (#101004).

Color palette

TokenLightDark
Background
#fcfcf8snow
#101004black
Foreground
#040401black
#fdfdfcwhite
Card
#fcfcf8snow
#101004black
Card foreground
#040401black
#fdfdfcwhite
Popover
#fcfcf8snow
#101004black
Popover foreground
#040401black
#fdfdfcwhite
Primary
#848551dimgray
#848551dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#518485slategray
#518485slategray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e9f1f2whitesmoke
#0d1616black
Muted foreground
#4a4f4fdarkslategray
#b0b5b5darkgray
Accent
#855184dimgray
#855184dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#611005maroon
#e4250corangered
Destructive foreground
#faa99elightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#848551dimgray
#848551dimgray

Contrast

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

Light mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button3.85:1AA Large
Secondary button4.20:1AA Large
Muted text7.28:1AAA
Accent5.97:1AA
Destructive7.09:1AAA
Dark mode
Text on background18.78:1AAA
Text on card18.78:1AAA
Primary button3.85:1AA Large
Secondary button4.20:1AA Large
Muted text8.83:1AAA
Accent5.97:1AA
Destructive4.60:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.006 107.281);
  --foreground: oklch(0.108 0.019 109.773);
  --muted: oklch(0.953 0.009 198.216);
  --muted-foreground: oklch(0.422 0.006 198.156);
  --popover: oklch(0.99 0.006 107.281);
  --popover-foreground: oklch(0.108 0.019 109.773);
  --card: oklch(0.99 0.006 107.281);
  --card-foreground: oklch(0.108 0.019 109.773);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.603 0.072 109.189);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.578 0.054 197.13);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.513 0.099 327.474);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.321 0.115 31.338);
  --destructive-foreground: oklch(0.81 0.098 27.699);
  --ring: oklch(0.603 0.072 109.189);
  --chart-1: oklch(0.603 0.072 109.189);
  --chart-2: oklch(0.578 0.054 197.13);
  --chart-3: oklch(0.513 0.099 327.474);
  --chart-4: oklch(0.607 0.057 197.124);
  --chart-5: oklch(0.612 0.079 109.359);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.169 0.025 109.515);
  --foreground: oklch(0.994 0.002 107.199);
  --muted: oklch(0.192 0.013 197.434);
  --muted-foreground: oklch(0.769 0.005 198.263);
  --popover: oklch(0.169 0.025 109.515);
  --popover-foreground: oklch(0.994 0.002 107.199);
  --card: oklch(0.169 0.025 109.515);
  --card-foreground: oklch(0.994 0.002 107.199);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.603 0.072 109.189);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.578 0.054 197.13);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.513 0.099 327.474);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.589 0.224 30.828);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.603 0.072 109.189);
  --chart-1: oklch(0.603 0.072 109.189);
  --chart-2: oklch(0.578 0.054 197.13);
  --chart-3: oklch(0.513 0.099 327.474);
  --chart-4: oklch(0.607 0.057 197.124);
  --chart-5: oklch(0.612 0.079 109.359);
}