Tradition for shadcn/ui

Tradition is a shadcn/ui theme built around a green primary color (#72df73) with purple accents (#df72dd). The light mode uses a neutral background (#f8fcf8). Dark mode keeps the green primary (#72df73) on a green-tinted background (#060f06).

Color palette

TokenLightDark
Background
#f8fcf8mintcream
#060f06black
Foreground
#000000black
#f6f9f6whitesmoke
Card
#f4faf4whitesmoke
#071207black
Card foreground
#000000black
#f9fbf9mintcream
Popover
#f8fcf8mintcream
#060f06black
Popover foreground
#000000black
#f6f9f6whitesmoke
Primary
#72df73lightgreen
#72df73lightgreen
Primary foreground
#061906black
#061906black
Secondary
#df72ddorchid
#df72ddorchid
Secondary foreground
#190619black
#190619black
Muted
#e6cbe6gainsboro
#341933darkslategray
Muted foreground
#644a63dimgray
#b59bb5darkgray
Accent
#df72ddorchid
#df72ddorchid
Accent foreground
#190619black
#190619black
Destructive
#7a2e06saddlebrown
#f46315chocolate
Destructive foreground
#fcceb6peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#72df73lightgreen
#72df73lightgreen

Contrast

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

Light mode
Text on background20.26:1AAA
Text on card19.89:1AAA
Primary button10.88:1AAA
Secondary button7.00:1AAA
Muted text5.21:1AA
Accent7.00:1AAA
Destructive6.58:1AA
Dark mode
Text on background18.39:1AAA
Text on card18.33:1AAA
Primary button10.88:1AAA
Secondary button7.00:1AAA
Muted text6.25:1AA
Accent7.00:1AAA
Destructive6.64:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.007 145.996);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.873 0.046 326.469);
  --muted-foreground: oklch(0.445 0.053 326.956);
  --popover: oklch(0.987 0.007 145.996);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.01 145.967);
  --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.814 0.177 144.044);
  --primary-foreground: oklch(0.19 0.046 143.905);
  --secondary: oklch(0.714 0.188 327.941);
  --secondary-foreground: oklch(0.165 0.049 328.129);
  --accent: oklch(0.714 0.188 327.941);
  --accent-foreground: oklch(0.165 0.049 328.129);
  --destructive: oklch(0.406 0.115 43.118);
  --destructive-foreground: oklch(0.885 0.061 49.847);
  --ring: oklch(0.814 0.177 144.044);
  --chart-1: oklch(0.814 0.177 144.044);
  --chart-2: oklch(0.714 0.188 327.941);
  --chart-3: oklch(0.714 0.188 327.941);
  --chart-4: oklch(0.736 0.172 327.751);
  --chart-5: oklch(0.819 0.184 143.967);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.025 144.734);
  --foreground: oklch(0.978 0.004 146.02);
  --muted: oklch(0.262 0.06 327.719);
  --muted-foreground: oklch(0.722 0.047 326.563);
  --popover: oklch(0.154 0.025 144.734);
  --popover-foreground: oklch(0.978 0.004 146.02);
  --card: oklch(0.169 0.029 144.611);
  --card-foreground: oklch(0.986 0.003 146.031);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.814 0.177 144.044);
  --primary-foreground: oklch(0.19 0.046 143.905);
  --secondary: oklch(0.714 0.188 327.941);
  --secondary-foreground: oklch(0.165 0.049 328.129);
  --accent: oklch(0.714 0.188 327.941);
  --accent-foreground: oklch(0.165 0.049 328.129);
  --destructive: oklch(0.676 0.194 42.703);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.814 0.177 144.044);
  --chart-1: oklch(0.814 0.177 144.044);
  --chart-2: oklch(0.714 0.188 327.941);
  --chart-3: oklch(0.714 0.188 327.941);
  --chart-4: oklch(0.736 0.172 327.751);
  --chart-5: oklch(0.819 0.184 143.967);
}