Green for shadcn/ui

Green is a shadcn/ui theme built around a deep red primary color (#230c05) with muted light red accents (#e0d8d6). The light mode uses a neutral background (#fcf9f8). Dark mode keeps the deep red primary (#230c05) on a neutral background (#070403).

Color palette

TokenLightDark
Background
#fcf9f8snow
#070403black
Foreground
#120602black
#fdfcfcsnow
Card
#faf6f5whitesmoke
#0a0605black
Card foreground
#0e0402black
#ffffffwhite
Popover
#faf6f5whitesmoke
#0a0605black
Popover foreground
#0e0402black
#ffffffwhite
Primary
#230c05black
#230c05black
Primary foreground
#ea8b71darksalmon
#ea8b71darksalmon
Secondary
#eae7e6linen
#211a18black
Secondary foreground
#554c4adarkslategray
#c1aea9darkgray
Muted
#eae3e1gainsboro
#1e1715black
Muted foreground
#666260dimgray
#9f9a99darkgray
Accent
#e0d8d6gainsboro
#352622darkslategray
Accent foreground
#4c3d39darkslategray
#d1bdb7silver
Destructive
#891906darkred
#f75336tomato
Destructive foreground
#fdcdc4pink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#230c05black
#230c05black

Contrast

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

Light mode
Text on background19.01:1AAA
Text on card18.84:1AAA
Primary button7.47:1AAA
Secondary button6.78:1AA
Muted text4.76:1AA
Accent7.38:1AAA
Destructive6.65:1AA
Dark mode
Text on background19.94:1AAA
Text on card20.15:1AAA
Primary button7.47:1AAA
Secondary button8.11:1AAA
Muted text6.35:1AA
Accent8.04:1AAA
Destructive6.23:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.003 36.001);
  --foreground: oklch(0.14 0.028 44.93);
  --muted: oklch(0.921 0.008 35.984);
  --muted-foreground: oklch(0.499 0.006 35.974);
  --popover: oklch(0.976 0.005 35.995);
  --popover-foreground: oklch(0.125 0.024 46.71);
  --card: oklch(0.976 0.005 35.995);
  --card-foreground: oklch(0.125 0.024 46.71);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.19 0.043 38.038);
  --primary-foreground: oklch(0.732 0.122 36.289);
  --secondary: oklch(0.93 0.003 36.001);
  --secondary-foreground: oklch(0.424 0.012 35.948);
  --accent: oklch(0.889 0.009 35.98);
  --accent-foreground: oklch(0.374 0.022 35.955);
  --destructive: oklch(0.41 0.149 32.081);
  --destructive-foreground: oklch(0.887 0.056 29.824);
  --ring: oklch(0.19 0.043 38.038);
  --chart-1: oklch(0.19 0.043 38.038);
  --chart-2: oklch(0.93 0.003 36.001);
  --chart-3: oklch(0.889 0.009 35.98);
  --chart-4: oklch(0.954 0.002 36.005);
  --chart-5: oklch(0.19 0.045 38.438);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.113 0.009 40.157);
  --foreground: oklch(0.992 0.001 36.009);
  --muted: oklch(0.212 0.012 35.952);
  --muted-foreground: oklch(0.689 0.006 35.985);
  --popover: oklch(0.129 0.01 40.143);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.129 0.01 40.143);
  --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.19 0.043 38.038);
  --primary-foreground: oklch(0.732 0.122 36.289);
  --secondary: oklch(0.223 0.012 35.95);
  --secondary-foreground: oklch(0.766 0.023 35.947);
  --accent: oklch(0.285 0.024 36.008);
  --accent-foreground: oklch(0.814 0.024 35.947);
  --destructive: oklch(0.663 0.204 32.36);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.19 0.043 38.038);
  --chart-1: oklch(0.19 0.043 38.038);
  --chart-2: oklch(0.223 0.012 35.95);
  --chart-3: oklch(0.285 0.024 36.008);
  --chart-4: oklch(0.255 0.015 35.955);
  --chart-5: oklch(0.19 0.045 38.438);
}