Pan for shadcn/ui

Pan is a shadcn/ui theme built around a green primary color (#20ac2b) with red accents (#ac2b20). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#20ac2b) on a green-tinted background (#040c04).

Color palette

TokenLightDark
Background
#ffffffwhite
#040c04black
Foreground
#020e03black
#f5faf5whitesmoke
Card
#fcfcfcsnow
#051006black
Card foreground
#010902black
#f8fcf8mintcream
Popover
#fcfcfcsnow
#051006black
Popover foreground
#010902black
#f8fcf8mintcream
Primary
#20ac2bforestgreen
#20ac2bforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#2b20acdarkslateblue
#2b20acdarkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dddbebgainsboro
#161424black
Muted foreground
#605f6ddimgray
#9392a0lightslategray
Accent
#ac2b20firebrick
#ac2b20firebrick
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#cf1a17firebrick
#ea4643tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#20ac2bforestgreen
#20ac2bforestgreen

Contrast

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

Light mode
Text on background19.68:1AAA
Text on card19.73:1AAA
Primary button2.98:1Fail
Secondary button11.02:1AAA
Muted text4.59:1AA
Accent6.70:1AA
Destructive5.52:1AA
Dark mode
Text on background18.78:1AAA
Text on card18.75:1AAA
Primary button2.98:1Fail
Secondary button11.02:1AAA
Muted text5.90:1AA
Accent6.70:1AA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.144 0.037 146.035);
  --muted: oklch(0.898 0.021 289.812);
  --muted-foreground: oklch(0.491 0.023 289.362);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.125 0.032 146.15);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.125 0.032 146.15);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.651 0.201 143.656);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.378 0.207 273.833);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.167 29.552);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.545 0.211 28.486);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.651 0.201 143.656);
  --chart-1: oklch(0.651 0.201 143.656);
  --chart-2: oklch(0.378 0.207 273.833);
  --chart-3: oklch(0.494 0.167 29.552);
  --chart-4: oklch(0.398 0.219 273.642);
  --chart-5: oklch(0.658 0.207 143.544);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.025 146.748);
  --foreground: oklch(0.98 0.009 147.967);
  --muted: oklch(0.203 0.03 287.225);
  --muted-foreground: oklch(0.665 0.021 289.647);
  --popover: oklch(0.156 0.029 146.498);
  --popover-foreground: oklch(0.987 0.006 148);
  --card: oklch(0.156 0.029 146.498);
  --card-foreground: oklch(0.987 0.006 148);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.651 0.201 143.656);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.378 0.207 273.833);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.167 29.552);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.63 0.202 25.909);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.651 0.201 143.656);
  --chart-1: oklch(0.651 0.201 143.656);
  --chart-2: oklch(0.378 0.207 273.833);
  --chart-3: oklch(0.494 0.167 29.552);
  --chart-4: oklch(0.398 0.219 273.642);
  --chart-5: oklch(0.658 0.207 143.544);
}