Wry for shadcn/ui

Wry is a shadcn/ui theme built around a vivid deep green primary color (#213f08) with vivid deep green accents (#083f0b). The light mode uses a neutral background (#fafdf7). Dark mode keeps the vivid deep green primary (#213f08) on a green-tinted background (#070a05).

Color palette

TokenLightDark
Background
#fafdf7mintcream
#070a05black
Foreground
#091202black
#fcfdfcwhite
Card
#f7fcf2whitesmoke
#0a0e07black
Card foreground
#070e02black
#ffffffwhite
Popover
#fafdf7mintcream
#070a05black
Popover foreground
#091202black
#fcfdfcwhite
Primary
#213f08darkgreen
#213f08darkgreen
Primary foreground
#81e42fyellowgreen
#81e42fyellowgreen
Secondary
#3c3f08darkolivegreen
#3c3f08darkolivegreen
Secondary foreground
#dbe42fgreenyellow
#dbe42fgreenyellow
Muted
#f0f1dfbeige
#1f200eblack
Muted foreground
#4f4f4fdarkslategray
#b0b0b0darkgray
Accent
#083f0bdarkgreen
#083f0bdarkgreen
Accent foreground
#2fe438limegreen
#2fe438limegreen
Destructive
#960f03darkred
#fb4332tomato
Destructive foreground
#fed1cdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#213f08darkgreen
#213f08darkgreen

Contrast

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

Light mode
Text on background18.62:1AAA
Text on card18.83:1AAA
Primary button7.33:1AAA
Secondary button7.91:1AAA
Muted text7.14:1AAA
Accent7.09:1AAA
Destructive6.42:1AA
Dark mode
Text on background19.49:1AAA
Text on card19.49:1AAA
Primary button7.33:1AAA
Secondary button7.91:1AAA
Muted text7.64:1AAA
Accent7.09:1AAA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.01 130.528);
  --foreground: oklch(0.169 0.038 130.377);
  --muted: oklch(0.952 0.023 109.153);
  --muted-foreground: oklch(0.428 0 180);
  --popover: oklch(0.99 0.01 130.528);
  --popover-foreground: oklch(0.169 0.038 130.377);
  --card: oklch(0.985 0.014 130.574);
  --card-foreground: oklch(0.15 0.032 129.153);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.332 0.088 134.532);
  --primary-foreground: oklch(0.826 0.224 134.897);
  --secondary: oklch(0.354 0.073 112.521);
  --secondary-foreground: oklch(0.883 0.185 112.657);
  --accent: oklch(0.322 0.098 143.451);
  --accent-foreground: oklch(0.802 0.25 143.281);
  --destructive: oklch(0.429 0.167 30.308);
  --destructive-foreground: oklch(0.898 0.051 24.226);
  --ring: oklch(0.332 0.088 134.532);
  --chart-1: oklch(0.332 0.088 134.532);
  --chart-2: oklch(0.354 0.073 112.521);
  --chart-3: oklch(0.322 0.098 143.451);
  --chart-4: oklch(0.403 0.084 112.615);
  --chart-5: oklch(0.335 0.09 134.683);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.014 129.59);
  --foreground: oklch(0.993 0.001 130.451);
  --muted: oklch(0.236 0.03 110.997);
  --muted-foreground: oklch(0.757 0 180);
  --popover: oklch(0.14 0.014 129.59);
  --popover-foreground: oklch(0.993 0.001 130.451);
  --card: oklch(0.155 0.017 130.47);
  --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.332 0.088 134.532);
  --primary-foreground: oklch(0.826 0.224 134.897);
  --secondary: oklch(0.354 0.073 112.521);
  --secondary-foreground: oklch(0.883 0.185 112.657);
  --accent: oklch(0.322 0.098 143.451);
  --accent-foreground: oklch(0.802 0.25 143.281);
  --destructive: oklch(0.654 0.222 29.576);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.332 0.088 134.532);
  --chart-1: oklch(0.332 0.088 134.532);
  --chart-2: oklch(0.354 0.073 112.521);
  --chart-3: oklch(0.322 0.098 143.451);
  --chart-4: oklch(0.403 0.084 112.615);
  --chart-5: oklch(0.335 0.09 134.683);
}