Green for shadcn/ui

Green is a shadcn/ui theme built around a green primary color (#a2cb9a) with green accents (#9acbaa). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#a2cb9a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040d02black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#030901black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#040d02black
#ffffffwhite
Primary
#a2cb9adarkseagreen
#a2cb9adarkseagreen
Primary foreground
#142211black
#142211black
Secondary
#bbcb9atan
#bbcb9atan
Secondary foreground
#1c2211black
#1c2211black
Muted
#e0eacdgainsboro
#283215darkslategray
Muted foreground
#555652dimgray
#abada9darkgray
Accent
#9acbaadarkseagreen
#9acbaadarkseagreen
Accent foreground
#112217black
#112217black
Destructive
#7c1503maroon
#f42a06orangered
Destructive foreground
#fdbfb4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a2cb9adarkseagreen
#a2cb9adarkseagreen

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.69:1AAA
Primary button9.11:1AAA
Secondary button9.41:1AAA
Muted text5.90:1AA
Accent9.08:1AAA
Destructive6.73:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button9.11:1AAA
Secondary button9.41:1AAA
Muted text5.95:1AA
Accent9.08:1AAA
Destructive4.06:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.145 0.034 138.35);
  --muted: oklch(0.921 0.039 122.185);
  --muted-foreground: oklch(0.45 0.006 121.692);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.145 0.034 138.35);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.126 0.03 138.217);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.8 0.08 140.387);
  --primary-foreground: oklch(0.233 0.036 140.343);
  --secondary: oklch(0.817 0.068 122.881);
  --secondary-foreground: oklch(0.24 0.03 123.67);
  --accent: oklch(0.798 0.069 155.358);
  --accent-foreground: oklch(0.232 0.031 154.171);
  --destructive: oklch(0.381 0.14 32.261);
  --destructive-foreground: oklch(0.859 0.073 30.016);
  --ring: oklch(0.8 0.08 140.387);
  --chart-1: oklch(0.8 0.08 140.387);
  --chart-2: oklch(0.817 0.068 122.881);
  --chart-3: oklch(0.798 0.069 155.358);
  --chart-4: oklch(0.836 0.061 122.705);
  --chart-5: oklch(0.803 0.088 140.378);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.3 0.049 124.438);
  --muted-foreground: oklch(0.744 0.005 121.599);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.8 0.08 140.387);
  --primary-foreground: oklch(0.233 0.036 140.343);
  --secondary: oklch(0.817 0.068 122.881);
  --secondary-foreground: oklch(0.24 0.03 123.67);
  --accent: oklch(0.798 0.069 155.358);
  --accent-foreground: oklch(0.232 0.031 154.171);
  --destructive: oklch(0.621 0.236 31.449);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.8 0.08 140.387);
  --chart-1: oklch(0.8 0.08 140.387);
  --chart-2: oklch(0.817 0.068 122.881);
  --chart-3: oklch(0.798 0.069 155.358);
  --chart-4: oklch(0.836 0.061 122.705);
  --chart-5: oklch(0.803 0.088 140.378);
}