Leafy for shadcn/ui

Leafy is a shadcn/ui theme built around a light green primary color (#a8f1a7) with light green accents (#a7f1cb). The light mode uses a neutral background (#f7fcf7). Dark mode keeps the light green primary (#a8f1a7) on a neutral background (#020802).

Color palette

TokenLightDark
Background
#f7fcf7mintcream
#020802black
Foreground
#050f05black
#f9fbf9mintcream
Card
#f7fcf7mintcream
#020802black
Card foreground
#050f05black
#f9fbf9mintcream
Popover
#f7fcf7mintcream
#020802black
Popover foreground
#050f05black
#f9fbf9mintcream
Primary
#a8f1a7palegreen
#a8f1a7palegreen
Primary foreground
#0f580edarkgreen
#0f580edarkgreen
Secondary
#cdf1a7palegoldenrod
#cdf1a7palegoldenrod
Secondary foreground
#34580edarkolivegreen
#34580edarkolivegreen
Muted
#f0f2edwhitesmoke
#0f120dblack
Muted foreground
#404739darkslategray
#bfc6b8silver
Accent
#a7f1cbpowderblue
#a7f1cbpowderblue
Accent foreground
#0e5832darkslategray
#0e5832darkslategray
Destructive
#8f220adarkred
#e53710orangered
Destructive foreground
#fcd7cfbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a8f1a7palegreen
#a8f1a7palegreen

Contrast

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

Light mode
Text on background18.84:1AAA
Text on card18.84:1AAA
Primary button6.53:1AA
Secondary button6.58:1AA
Muted text8.55:1AAA
Accent6.54:1AA
Destructive6.55:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button6.53:1AA
Secondary button6.58:1AA
Muted text10.78:1AAA
Accent6.54:1AA
Destructive4.30:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.009 145.04);
  --foreground: oklch(0.155 0.028 143.598);
  --muted: oklch(0.958 0.007 127.874);
  --muted-foreground: oklch(0.386 0.025 128.564);
  --popover: oklch(0.987 0.009 145.04);
  --popover-foreground: oklch(0.155 0.028 143.598);
  --card: oklch(0.987 0.009 145.04);
  --card-foreground: oklch(0.155 0.028 143.598);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.892 0.124 144.062);
  --primary-foreground: oklch(0.403 0.126 142.634);
  --secondary: oklch(0.915 0.104 129.234);
  --secondary-foreground: oklch(0.418 0.108 132.655);
  --accent: oklch(0.9 0.091 161.322);
  --accent-foreground: oklch(0.408 0.095 154.702);
  --destructive: oklch(0.43 0.148 33.435);
  --destructive-foreground: oklch(0.909 0.042 32.745);
  --ring: oklch(0.892 0.124 144.062);
  --chart-1: oklch(0.892 0.124 144.062);
  --chart-2: oklch(0.915 0.104 129.234);
  --chart-3: oklch(0.9 0.091 161.322);
  --chart-4: oklch(0.927 0.089 128.982);
  --chart-5: oklch(0.894 0.129 144.023);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.023 143.529);
  --foreground: oklch(0.985 0.002 145.085);
  --muted: oklch(0.176 0.011 128.508);
  --muted-foreground: oklch(0.818 0.021 128.088);
  --popover: oklch(0.122 0.023 143.529);
  --popover-foreground: oklch(0.985 0.002 145.085);
  --card: oklch(0.122 0.023 143.529);
  --card-foreground: oklch(0.985 0.002 145.085);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.892 0.124 144.062);
  --primary-foreground: oklch(0.403 0.126 142.634);
  --secondary: oklch(0.915 0.104 129.234);
  --secondary-foreground: oklch(0.418 0.108 132.655);
  --accent: oklch(0.9 0.091 161.322);
  --accent-foreground: oklch(0.408 0.095 154.702);
  --destructive: oklch(0.604 0.215 33.086);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.892 0.124 144.062);
  --chart-1: oklch(0.892 0.124 144.062);
  --chart-2: oklch(0.915 0.104 129.234);
  --chart-3: oklch(0.9 0.091 161.322);
  --chart-4: oklch(0.927 0.089 128.982);
  --chart-5: oklch(0.894 0.129 144.023);
}