Evergreen for shadcn/ui

Evergreen is a shadcn/ui theme built around a blue primary color (#4d8cc7) with muted blue accents (#b7bdc2). The light mode uses a neutral background (#f8fafc). Dark mode keeps the blue primary (#4d8cc7) on a blue-tinted background (#060a0e).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#060a0eblack
Foreground
#010509black
#fcfcfdwhite
Card
#f8fafcghostwhite
#060a0eblack
Card foreground
#010509black
#fcfcfdwhite
Popover
#f8fafcghostwhite
#060a0eblack
Popover foreground
#010509black
#fcfcfdwhite
Primary
#4d8cc7steelblue
#4d8cc7steelblue
Primary foreground
#000000black
#000000black
Secondary
#cecfcflightgrey
#242c33darkslategray
Secondary foreground
#353636darkslategray
#bac5cfsilver
Muted
#cad9e7gainsboro
#182735darkslategray
Muted foreground
#56616cdimgray
#939ea9darkgray
Accent
#b7bdc2silver
#2d3e4edarkslategray
Accent foreground
#212427darkslategray
#cbd7e1lightgrey
Destructive
#960d0ddarkred
#eb1e1ecrimson
Destructive foreground
#fcd9d9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4d8cc7steelblue
#4d8cc7steelblue

Contrast

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

Light mode
Text on background19.54:1AAA
Text on card19.54:1AAA
Primary button5.87:1AA
Secondary button7.74:1AAA
Muted text4.40:1AA Large
Accent8.22:1AAA
Destructive6.79:1AA
Dark mode
Text on background19.33:1AAA
Text on card19.33:1AAA
Primary button5.87:1AA
Secondary button8.11:1AAA
Muted text5.59:1AA
Accent7.53:1AAA
Destructive4.42:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.003 246.001);
  --foreground: oklch(0.112 0.016 235.926);
  --muted: oklch(0.879 0.025 246.294);
  --muted-foreground: oklch(0.488 0.021 246.467);
  --popover: oklch(0.984 0.003 246.001);
  --popover-foreground: oklch(0.112 0.016 235.926);
  --card: oklch(0.984 0.003 246.001);
  --card-foreground: oklch(0.112 0.016 235.926);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.623 0.111 248.574);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.853 0.001 245.978);
  --secondary-foreground: oklch(0.331 0.001 246.008);
  --accent: oklch(0.795 0.009 246.104);
  --accent-foreground: oklch(0.258 0.007 246.266);
  --destructive: oklch(0.429 0.168 28.227);
  --destructive-foreground: oklch(0.915 0.038 17.872);
  --ring: oklch(0.623 0.111 248.574);
  --chart-1: oklch(0.623 0.111 248.574);
  --chart-2: oklch(0.853 0.001 245.978);
  --chart-3: oklch(0.795 0.009 246.104);
  --chart-4: oklch(0.877 0.001 245.976);
  --chart-5: oklch(0.623 0.117 248.796);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.143 0.011 243.738);
  --foreground: oklch(0.992 0.001 245.972);
  --muted: oklch(0.265 0.033 247.557);
  --muted-foreground: oklch(0.695 0.02 246.289);
  --popover: oklch(0.143 0.011 243.738);
  --popover-foreground: oklch(0.992 0.001 245.972);
  --card: oklch(0.143 0.011 243.738);
  --card-foreground: oklch(0.992 0.001 245.972);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.623 0.111 248.574);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.287 0.018 246.68);
  --secondary-foreground: oklch(0.817 0.019 246.228);
  --accent: oklch(0.355 0.036 247.167);
  --accent-foreground: oklch(0.872 0.019 246.218);
  --destructive: oklch(0.6 0.233 28.077);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.623 0.111 248.574);
  --chart-1: oklch(0.623 0.111 248.574);
  --chart-2: oklch(0.287 0.018 246.68);
  --chart-3: oklch(0.355 0.036 247.167);
  --chart-4: oklch(0.317 0.021 246.708);
  --chart-5: oklch(0.623 0.117 248.796);
}