Barley for shadcn/ui

Barley is a shadcn/ui theme built around a muted green primary color (#c2c9ac) with muted indigo accents (#b2acc9). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#c2c9ac) on a green-tinted background (#090b05).

Color palette

TokenLightDark
Background
#ffffffwhite
#090b05black
Foreground
#040401black
#f9f9f5whitesmoke
Card
#fcfcfcsnow
#0c0e06black
Card foreground
#000000black
#fbfbf8snow
Popover
#fcfcfcsnow
#0c0e06black
Popover foreground
#000000black
#fbfbf8snow
Primary
#c2c9acsilver
#c2c9acsilver
Primary foreground
#25281ablack
#25281ablack
Secondary
#b2acc9silver
#b2acc9silver
Secondary foreground
#1d1a28black
#1d1a28black
Muted
#d5d0e7gainsboro
#1d182fblack
Muted foreground
#5a585fdimgray
#a1a0a7darkgray
Accent
#b2acc9silver
#b2acc9silver
Accent foreground
#1d1a28black
#1d1a28black
Destructive
#992a05saddlebrown
#f74408orangered
Destructive foreground
#feddd2blanchedalmond
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c2c9acsilver
#c2c9acsilver

Contrast

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

Light mode
Text on background20.52:1AAA
Text on card20.54:1AAA
Primary button8.74:1AAA
Secondary button7.80:1AAA
Muted text4.65:1AA
Accent7.80:1AAA
Destructive6.12:1AA
Dark mode
Text on background18.76:1AAA
Text on card18.70:1AAA
Primary button8.74:1AAA
Secondary button7.80:1AAA
Muted text6.61:1AA
Accent7.80:1AAA
Destructive3.62:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.106 0.019 116.868);
  --muted: oklch(0.867 0.033 295.641);
  --muted-foreground: oklch(0.465 0.012 295.864);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.822 0.04 117.215);
  --primary-foreground: oklch(0.27 0.025 118.035);
  --secondary: oklch(0.758 0.041 295.323);
  --secondary-foreground: oklch(0.229 0.027 294.108);
  --accent: oklch(0.758 0.041 295.323);
  --accent-foreground: oklch(0.229 0.027 294.108);
  --destructive: oklch(0.456 0.153 35.949);
  --destructive-foreground: oklch(0.922 0.039 39.307);
  --ring: oklch(0.822 0.04 117.215);
  --chart-1: oklch(0.822 0.04 117.215);
  --chart-2: oklch(0.758 0.041 295.323);
  --chart-3: oklch(0.758 0.041 295.323);
  --chart-4: oklch(0.786 0.037 295.477);
  --chart-5: oklch(0.827 0.045 117.333);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.144 0.015 116.694);
  --foreground: oklch(0.982 0.006 116.436);
  --muted: oklch(0.227 0.045 292.399);
  --muted-foreground: oklch(0.708 0.011 296.055);
  --popover: oklch(0.16 0.017 117.726);
  --popover-foreground: oklch(0.988 0.004 116.401);
  --card: oklch(0.16 0.017 117.726);
  --card-foreground: oklch(0.988 0.004 116.401);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.822 0.04 117.215);
  --primary-foreground: oklch(0.27 0.025 118.035);
  --secondary: oklch(0.758 0.041 295.323);
  --secondary-foreground: oklch(0.229 0.027 294.108);
  --accent: oklch(0.758 0.041 295.323);
  --accent-foreground: oklch(0.229 0.027 294.108);
  --destructive: oklch(0.646 0.223 35.137);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.822 0.04 117.215);
  --chart-1: oklch(0.822 0.04 117.215);
  --chart-2: oklch(0.758 0.041 295.323);
  --chart-3: oklch(0.758 0.041 295.323);
  --chart-4: oklch(0.786 0.037 295.477);
  --chart-5: oklch(0.827 0.045 117.333);
}