cucumber green setup for shadcn/ui

cucumber green setup is a shadcn/ui theme built around a muted green primary color (#526f4d) with muted purple accents (#6a4d6f). The light mode uses a neutral background (#fcfefb). Dark mode keeps the muted green primary (#526f4d) on a green-tinted background (#070e06).

Color palette

TokenLightDark
Background
#fcfefbwhite
#070e06black
Foreground
#050c03black
#fcfdfcwhite
Card
#f8fcf7mintcream
#091208black
Card foreground
#030802black
#ffffffwhite
Popover
#fcfefbwhite
#070e06black
Popover foreground
#050c03black
#fcfdfcwhite
Primary
#526f4ddarkolivegreen
#526f4ddarkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#6a4d6fdimgray
#6a4d6fdimgray
Secondary foreground
#f8f6f9whitesmoke
#f8f6f9whitesmoke
Muted
#ebe9eclavender
#151316black
Muted foreground
#605c61dimgray
#a39ea3darkgray
Accent
#6a4d6fdimgray
#6a4d6fdimgray
Accent foreground
#f8f6f9whitesmoke
#f8f6f9whitesmoke
Destructive
#df3c01orangered
#e43e01orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e2e4e2gainsboro
#1b1d1bblack
Input
#e2e4e2gainsboro
#1b1d1bblack
Ring
#526f4ddarkolivegreen
#526f4ddarkolivegreen

Contrast

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

Light mode
Text on background19.48:1AAA
Text on card19.54:1AAA
Primary button5.58:1AA
Secondary button6.69:1AA
Muted text5.45:1AA
Accent6.69:1AA
Destructive4.37:1AA Large
Dark mode
Text on background19.13:1AAA
Text on card19.08:1AAA
Primary button5.58:1AA
Secondary button6.69:1AA
Muted text7.00:1AAA
Accent6.69:1AA
Destructive4.20:1AA Large

CSS variables

Paste this into your globals.css to use cucumber green setup in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 141.057);
  --foreground: oklch(0.142 0.026 139.354);
  --muted: oklch(0.937 0.004 321.074);
  --muted-foreground: oklch(0.479 0.011 321.114);
  --popover: oklch(0.994 0.004 141.057);
  --popover-foreground: oklch(0.142 0.026 139.354);
  --card: oklch(0.988 0.008 141.048);
  --card-foreground: oklch(0.123 0.023 139.302);
  --border: oklch(0.917 0.005 141.054);
  --input: oklch(0.917 0.005 141.054);
  --primary: oklch(0.51 0.062 140.814);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.465 0.064 321.334);
  --secondary-foreground: oklch(0.976 0.004 321.075);
  --accent: oklch(0.465 0.064 321.334);
  --accent-foreground: oklch(0.976 0.004 321.075);
  --destructive: oklch(0.598 0.207 35.564);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.51 0.062 140.814);
  --chart-1: oklch(0.51 0.062 140.814);
  --chart-2: oklch(0.465 0.064 321.334);
  --chart-3: oklch(0.465 0.064 321.334);
  --chart-4: oklch(0.491 0.069 321.337);
  --chart-5: oklch(0.516 0.072 140.785);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.021 140.099);
  --foreground: oklch(0.993 0.003 141.059);
  --muted: oklch(0.191 0.006 321.131);
  --muted-foreground: oklch(0.704 0.01 321.095);
  --popover: oklch(0.154 0.021 140.099);
  --popover-foreground: oklch(0.993 0.003 141.059);
  --card: oklch(0.169 0.024 140.46);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.229 0.006 141.004);
  --input: oklch(0.229 0.006 141.004);
  --primary: oklch(0.51 0.062 140.814);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.465 0.064 321.334);
  --secondary-foreground: oklch(0.976 0.004 321.075);
  --accent: oklch(0.465 0.064 321.334);
  --accent-foreground: oklch(0.976 0.004 321.075);
  --destructive: oklch(0.608 0.21 35.52);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.51 0.062 140.814);
  --chart-1: oklch(0.51 0.062 140.814);
  --chart-2: oklch(0.465 0.064 321.334);
  --chart-3: oklch(0.465 0.064 321.334);
  --chart-4: oklch(0.491 0.069 321.337);
  --chart-5: oklch(0.516 0.072 140.785);
}