Apothecary v2 for shadcn/ui

Apothecary v2 is a shadcn/ui theme built around a muted deep green primary color (#41563f) with muted deep green accents (#41563f). The light mode uses a yellow-tinted background (#e0d4b5). Dark mode switches to a muted deep blue primary (#1b242d) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#e0d4b5wheat
#010304black
Foreground
#040d16black
#f6f7f9whitesmoke
Card
#f3f0e7linen
#010304black
Card foreground
#1c211ablack
#f6f7f9whitesmoke
Popover
#f3f0e7linen
#010304black
Popover foreground
#040d16black
#f6f7f9whitesmoke
Primary
#41563fdarkslategray
#1b242ddarkslategray
Primary foreground
#e1f4dcbeige
#acbecdlightsteelblue
Secondary
#1f411fdarkslategray
#2d231bblack
Secondary foreground
#cdbcacsilver
#cdbcacsilver
Muted
#b5a790rosybrown
#2d231ablack
Muted foreground
#6b6057dimgray
#b6b0aadarkgray
Accent
#41563fdarkslategray
#2d231bblack
Accent foreground
#cdbcacsilver
#cdbcacsilver
Destructive
#7d2308maroon
#e1400eorangered
Destructive foreground
#fbcbbcpeachpuff
#ffffffwhite
Border
#d0d6celightgrey
#1b1f23black
Input
#ede2cbbisque
#1b1f23black
Ring
#1b242ddarkslategray
#1b242ddarkslategray

Contrast

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

Light mode
Text on background13.22:1AAA
Text on card14.37:1AAA
Primary button6.90:1AA
Secondary button6.22:1AA
Muted text2.58:1Fail
Accent4.33:1AA Large
Destructive6.80:1AA
Dark mode
Text on background19.30:1AAA
Text on card19.30:1AAA
Primary button8.21:1AAA
Secondary button8.32:1AAA
Muted text7.14:1AAA
Accent8.32:1AAA
Destructive4.24:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.871 0.042 89.034);
  --foreground: oklch(0.155 0.024 242.537);
  --muted: oklch(0.734 0.036 80.236);
  --muted-foreground: oklch(0.497 0.02 61.643);
  --popover: oklch(0.955 0.012 91.519);
  --popover-foreground: oklch(0.155 0.024 242.537);
  --card: oklch(0.955 0.012 88.895);
  --card-foreground: oklch(0.24 0.015 136.73);
  --border: oklch(0.869 0.012 138.577);
  --input: oklch(0.916 0.033 85.723);
  --primary: oklch(0.429 0.046 142.82);
  --primary-foreground: oklch(0.947 0.038 139.172);
  --secondary: oklch(0.339 0.07 143.847);
  --secondary-foreground: oklch(0.805 0.029 63.607);
  --accent: oklch(0.429 0.045 142.533);
  --accent-foreground: oklch(0.805 0.029 63.607);
  --destructive: oklch(0.396 0.128 35.898);
  --destructive-foreground: oklch(0.879 0.059 37.592);
  --ring: oklch(0.256 0.021 245.144);
  --chart-1: oklch(0.256 0.021 245.144);
  --chart-2: oklch(0.265 0.021 62.929);
  --chart-3: oklch(0.265 0.021 62.929);
  --chart-4: oklch(0.297 0.024 62.854);
  --chart-5: oklch(0.256 0.023 245.288);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.09 0.008 238.021);
  --foreground: oklch(0.977 0.002 244.117);
  --muted: oklch(0.266 0.022 62.814);
  --muted-foreground: oklch(0.76 0.011 63.898);
  --popover: oklch(0.09 0.008 238.021);
  --popover-foreground: oklch(0.977 0.002 244.117);
  --card: oklch(0.09 0.008 238.021);
  --card-foreground: oklch(0.977 0.002 244.117);
  --border: oklch(0.236 0.01 244.593);
  --input: oklch(0.236 0.01 244.593);
  --primary: oklch(0.256 0.021 245.144);
  --primary-foreground: oklch(0.792 0.029 244.551);
  --secondary: oklch(0.265 0.021 62.929);
  --secondary-foreground: oklch(0.805 0.029 63.607);
  --accent: oklch(0.265 0.021 62.929);
  --accent-foreground: oklch(0.805 0.029 63.607);
  --destructive: oklch(0.605 0.205 35.148);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.256 0.021 245.144);
  --chart-1: oklch(0.256 0.021 245.144);
  --chart-2: oklch(0.265 0.021 62.929);
  --chart-3: oklch(0.265 0.021 62.929);
  --chart-4: oklch(0.297 0.024 62.854);
  --chart-5: oklch(0.256 0.023 245.288);
}