Crust for shadcn/ui

Crust is a shadcn/ui theme built around a vivid deep green primary color (#27520a) with vivid deep green accents (#0a5211). The light mode uses a neutral background (#f9fdf7). Dark mode keeps the vivid deep green primary (#27520a) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#020401black
Foreground
#040802black
#ffffffwhite
Card
#f6fcf3whitesmoke
#050703black
Card foreground
#020401black
#ffffffwhite
Popover
#f9fdf7mintcream
#020401black
Popover foreground
#040802black
#ffffffwhite
Primary
#27520adarkgreen
#27520adarkgreen
Primary foreground
#bef39bpalegreen
#bef39bpalegreen
Secondary
#4b520adarkolivegreen
#4b520adarkolivegreen
Secondary foreground
#d7e740greenyellow
#d7e740greenyellow
Muted
#e9ebdbbeige
#222414black
Muted foreground
#4f5143darkolivegreen
#babcaesilver
Accent
#0a5211darkgreen
#0a5211darkgreen
Accent foreground
#9bf3a4palegreen
#9bf3a4palegreen
Destructive
#c62501firebrick
#fe5934tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#27520adarkgreen
#27520adarkgreen

Contrast

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

Light mode
Text on background19.60:1AAA
Text on card19.70:1AAA
Primary button7.20:1AAA
Secondary button6.16:1AA
Muted text6.70:1AA
Accent7.09:1AAA
Destructive5.73:1AA
Dark mode
Text on background20.60:1AAA
Text on card20.21:1AAA
Primary button7.20:1AAA
Secondary button6.16:1AA
Muted text8.18:1AAA
Accent7.09:1AAA
Destructive6.69:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.008 132.421);
  --foreground: oklch(0.126 0.021 130.845);
  --muted: oklch(0.934 0.021 111.432);
  --muted-foreground: oklch(0.428 0.021 111.936);
  --popover: oklch(0.989 0.008 132.421);
  --popover-foreground: oklch(0.126 0.021 130.845);
  --card: oklch(0.984 0.012 132.454);
  --card-foreground: oklch(0.1 0.017 130.845);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.391 0.109 136.274);
  --primary-foreground: oklch(0.906 0.126 133.563);
  --secondary: oklch(0.417 0.09 115.596);
  --secondary-foreground: oklch(0.888 0.182 115.196);
  --accent: oklch(0.382 0.117 143.927);
  --accent-foreground: oklch(0.888 0.137 146.679);
  --destructive: oklch(0.534 0.199 32.501);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.391 0.109 136.274);
  --chart-1: oklch(0.391 0.109 136.274);
  --chart-2: oklch(0.417 0.09 115.596);
  --chart-3: oklch(0.382 0.117 143.927);
  --chart-4: oklch(0.464 0.101 115.693);
  --chart-5: oklch(0.395 0.112 136.442);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.012 131.251);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.253 0.028 113.031);
  --muted-foreground: oklch(0.789 0.018 111.45);
  --popover: oklch(0.098 0.012 131.251);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.123 0.015 131.251);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.391 0.109 136.274);
  --primary-foreground: oklch(0.906 0.126 133.563);
  --secondary: oklch(0.417 0.09 115.596);
  --secondary-foreground: oklch(0.888 0.182 115.196);
  --accent: oklch(0.382 0.117 143.927);
  --accent-foreground: oklch(0.888 0.137 146.679);
  --destructive: oklch(0.681 0.207 34.067);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.391 0.109 136.274);
  --chart-1: oklch(0.391 0.109 136.274);
  --chart-2: oklch(0.417 0.09 115.596);
  --chart-3: oklch(0.382 0.117 143.927);
  --chart-4: oklch(0.464 0.101 115.693);
  --chart-5: oklch(0.395 0.112 136.442);
}