Greens for shadcn/ui

Greens is a shadcn/ui theme built around a vivid violet primary color (#ae4ae8) with vivid green accents (#84e84a). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid violet primary (#ae4ae8) on a violet-tinted background (#08050a).

Color palette

TokenLightDark
Background
#fdfbfewhite
#08050ablack
Foreground
#09020dblack
#fdfcfdwhite
Card
#fdfbfewhite
#08050ablack
Card foreground
#09020dblack
#fdfcfdwhite
Popover
#fdfbfewhite
#08050ablack
Popover foreground
#09020dblack
#fdfcfdwhite
Primary
#ae4ae8mediumorchid
#ae4ae8mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#84e84ayellowgreen
#84e84ayellowgreen
Secondary foreground
#000000black
#000000black
Muted
#edeeecwhitesmoke
#121311black
Muted foreground
#5c6756dimgray
#9ea998darkgray
Accent
#84e84ayellowgreen
#84e84ayellowgreen
Accent foreground
#000000black
#000000black
Destructive
#6f130bmaroon
#ea3a2acrimson
Destructive foreground
#f8bab5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ae4ae8mediumorchid
#ae4ae8mediumorchid

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button4.24:1AA Large
Secondary button13.57:1AAA
Muted text5.11:1AA
Accent13.57:1AAA
Destructive7.11:1AAA
Dark mode
Text on background19.76:1AAA
Text on card19.76:1AAA
Primary button4.24:1AA Large
Secondary button13.57:1AAA
Muted text7.63:1AAA
Accent13.57:1AAA
Destructive4.09:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 313.573);
  --foreground: oklch(0.116 0.033 315.492);
  --muted: oklch(0.948 0.003 133.623);
  --muted-foreground: oklch(0.499 0.029 133.989);
  --popover: oklch(0.99 0.005 313.573);
  --popover-foreground: oklch(0.116 0.033 315.492);
  --card: oklch(0.99 0.005 313.573);
  --card-foreground: oklch(0.116 0.033 315.492);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.611 0.232 310.329);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.838 0.212 136.227);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.838 0.212 136.227);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.354 0.127 29.882);
  --destructive-foreground: oklch(0.844 0.072 24.616);
  --ring: oklch(0.611 0.232 310.329);
  --chart-1: oklch(0.611 0.232 310.329);
  --chart-2: oklch(0.838 0.212 136.227);
  --chart-3: oklch(0.838 0.212 136.227);
  --chart-4: oklch(0.848 0.2 135.871);
  --chart-5: oklch(0.611 0.238 310.135);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.014 314.59);
  --foreground: oklch(0.992 0.002 313.596);
  --muted: oklch(0.184 0.004 133.743);
  --muted-foreground: oklch(0.722 0.027 133.844);
  --popover: oklch(0.125 0.014 314.59);
  --popover-foreground: oklch(0.992 0.002 313.596);
  --card: oklch(0.125 0.014 314.59);
  --card-foreground: oklch(0.992 0.002 313.596);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.611 0.232 310.329);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.838 0.212 136.227);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.838 0.212 136.227);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.616 0.215 29.72);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.611 0.232 310.329);
  --chart-1: oklch(0.611 0.232 310.329);
  --chart-2: oklch(0.838 0.212 136.227);
  --chart-3: oklch(0.838 0.212 136.227);
  --chart-4: oklch(0.848 0.2 135.871);
  --chart-5: oklch(0.611 0.238 310.135);
}