Spinach for shadcn/ui

Spinach is a shadcn/ui theme built around a deep green primary color (#225332) with deep teal accents (#22534b). The light mode uses a neutral background (#f8fcf9). Dark mode keeps the deep green primary (#225332) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8fcf9mintcream
#000000black
Foreground
#000000black
#ffffffwhite
Card
#f8fcf9mintcream
#000000black
Card foreground
#000000black
#ffffffwhite
Popover
#f8fcf9mintcream
#000000black
Popover foreground
#000000black
#ffffffwhite
Primary
#225332darkslategray
#225332darkslategray
Primary foreground
#c1e6celightgrey
#c1e6celightgrey
Secondary
#2a5322darkslategray
#2a5322darkslategray
Secondary foreground
#c8e6c1lightgrey
#c8e6c1lightgrey
Muted
#eaece9linen
#131613black
Muted foreground
#4a5747darkslategray
#abb8a8darkgray
Accent
#22534bdarkslategray
#22534bdarkslategray
Accent foreground
#c1e6e0powderblue
#c1e6e0powderblue
Destructive
#9e3b0asaddlebrown
#f06119chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#225332darkslategray
#225332darkslategray

Contrast

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

Light mode
Text on background20.28:1AAA
Text on card20.28:1AAA
Primary button6.55:1AA
Secondary button6.56:1AA
Muted text6.44:1AA
Accent6.48:1AA
Destructive6.77:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button6.55:1AA
Secondary button6.56:1AA
Muted text8.80:1AAA
Accent6.48:1AA
Destructive6.42:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.006 157.144);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.941 0.005 140.523);
  --muted-foreground: oklch(0.44 0.03 140.428);
  --popover: oklch(0.987 0.006 157.144);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.006 157.144);
  --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.4 0.077 152.244);
  --primary-foreground: oklch(0.892 0.05 156.057);
  --secondary: oklch(0.4 0.09 140.386);
  --secondary-foreground: oklch(0.893 0.059 140.433);
  --accent: oklch(0.407 0.055 180.928);
  --accent-foreground: oklch(0.897 0.039 184.276);
  --destructive: oklch(0.486 0.142 41.591);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.4 0.077 152.244);
  --chart-1: oklch(0.4 0.077 152.244);
  --chart-2: oklch(0.4 0.09 140.386);
  --chart-3: oklch(0.407 0.055 180.928);
  --chart-4: oklch(0.435 0.1 140.393);
  --chart-5: oklch(0.404 0.082 151.904);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.196 0.008 140.471);
  --muted-foreground: oklch(0.767 0.027 140.478);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.4 0.077 152.244);
  --primary-foreground: oklch(0.892 0.05 156.057);
  --secondary: oklch(0.4 0.09 140.386);
  --secondary-foreground: oklch(0.893 0.059 140.433);
  --accent: oklch(0.407 0.055 180.928);
  --accent-foreground: oklch(0.897 0.039 184.276);
  --destructive: oklch(0.667 0.192 41.964);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.4 0.077 152.244);
  --chart-1: oklch(0.4 0.077 152.244);
  --chart-2: oklch(0.4 0.09 140.386);
  --chart-3: oklch(0.407 0.055 180.928);
  --chart-4: oklch(0.435 0.1 140.393);
  --chart-5: oklch(0.404 0.082 151.904);
}