Lean for shadcn/ui

Lean is a shadcn/ui theme built around a yellow primary color (#796e2a) with green accents (#5c792a). The light mode uses a neutral background (#fefefb). Dark mode keeps the yellow primary (#796e2a) on a yellow-tinted background (#0e0d07).

Color palette

TokenLightDark
Background
#fefefbwhite
#0e0d07black
Foreground
#100f04black
#fbfbf9snow
Card
#fefefbwhite
#0e0d07black
Card foreground
#100f04black
#fbfbf9snow
Popover
#fefefbwhite
#0e0d07black
Popover foreground
#100f04black
#fbfbf9snow
Primary
#796e2aolivedrab
#796e2aolivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#79472asaddlebrown
#79472asaddlebrown
Secondary foreground
#f4e8e1linen
#f4e8e1linen
Muted
#e9dbd3gainsboro
#2c1e16black
Muted foreground
#49413cdarkslategray
#c3bbb6silver
Accent
#5c792adarkolivegreen
#5c792adarkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b03111firebrick
#df3e16orangered
Destructive foreground
#fef7f6snow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#796e2aolivedrab
#796e2aolivedrab

Contrast

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

Light mode
Text on background18.99:1AAA
Text on card18.99:1AAA
Primary button5.13:1AA
Secondary button6.35:1AA
Muted text7.37:1AAA
Accent4.98:1AA
Destructive6.00:1AA
Dark mode
Text on background18.79:1AAA
Text on card18.79:1AAA
Primary button5.13:1AA
Secondary button6.35:1AA
Muted text8.49:1AAA
Accent4.98:1AA
Destructive4.34:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 99.397);
  --foreground: oklch(0.165 0.023 101.76);
  --muted: oklch(0.9 0.019 52.295);
  --muted-foreground: oklch(0.38 0.014 52.097);
  --popover: oklch(0.996 0.004 99.397);
  --popover-foreground: oklch(0.165 0.023 101.76);
  --card: oklch(0.996 0.004 99.397);
  --card-foreground: oklch(0.165 0.023 101.76);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.535 0.089 100.583);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.451 0.08 49.741);
  --secondary-foreground: oklch(0.939 0.017 52.344);
  --accent: oklch(0.536 0.111 126.921);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.506 0.169 34.315);
  --destructive-foreground: oklch(0.982 0.008 34.305);
  --ring: oklch(0.535 0.089 100.583);
  --chart-1: oklch(0.535 0.089 100.583);
  --chart-2: oklch(0.451 0.08 49.741);
  --chart-3: oklch(0.536 0.111 126.921);
  --chart-4: oklch(0.48 0.086 49.685);
  --chart-5: oklch(0.541 0.093 100.521);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.014 100.888);
  --foreground: oklch(0.987 0.002 99.378);
  --muted: oklch(0.251 0.027 51.175);
  --muted-foreground: oklch(0.797 0.012 52.383);
  --popover: oklch(0.157 0.014 100.888);
  --popover-foreground: oklch(0.987 0.002 99.378);
  --card: oklch(0.157 0.014 100.888);
  --card-foreground: oklch(0.987 0.002 99.378);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.535 0.089 100.583);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.451 0.08 49.741);
  --secondary-foreground: oklch(0.939 0.017 52.344);
  --accent: oklch(0.536 0.111 126.921);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.6 0.203 34.157);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.535 0.089 100.583);
  --chart-1: oklch(0.535 0.089 100.583);
  --chart-2: oklch(0.451 0.08 49.741);
  --chart-3: oklch(0.536 0.111 126.921);
  --chart-4: oklch(0.48 0.086 49.685);
  --chart-5: oklch(0.541 0.093 100.521);
}