Spring for shadcn/ui

Spring is a shadcn/ui theme built around a muted deep green primary color (#263b2f) with muted light green accents (#e5ebe8). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#263b2f) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#f6f8f7whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#000000black
#f6f8f7whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#000000black
#f6f8f7whitesmoke
Primary
#263b2fdarkslategray
#263b2fdarkslategray
Primary foreground
#bed5c8silver
#bed5c8silver
Secondary
#e5ebe8lavender
#2e2e2edarkslategray
Secondary foreground
#45594edarkslategray
#c7c7c7silver
Muted
#e4f1eahoneydew
#1b0e0eblack
Muted foreground
#4d5c53darkslategray
#b2a3a3darkgray
Accent
#e5ebe8lavender
#2e2e2edarkslategray
Accent foreground
#45594edarkslategray
#c7c7c7silver
Destructive
#7c2204maroon
#f96534tomato
Destructive foreground
#fdc7b5peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#263b2fdarkslategray
#263b2fdarkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.73:1AAA
Secondary button6.22:1AA
Muted text6.09:1AA
Accent6.22:1AA
Destructive6.73:1AA
Dark mode
Text on background19.68:1AAA
Text on card19.68:1AAA
Primary button7.73:1AAA
Secondary button8.04:1AAA
Muted text7.77:1AAA
Accent8.04:1AAA
Destructive6.94:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.947 0.017 162.16);
  --muted-foreground: oklch(0.458 0.023 161.311);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.331 0.034 159.723);
  --primary-foreground: oklch(0.852 0.031 161.693);
  --secondary: oklch(0.935 0.008 162.413);
  --secondary-foreground: oklch(0.444 0.031 160.746);
  --accent: oklch(0.935 0.008 162.413);
  --accent-foreground: oklch(0.444 0.031 160.746);
  --destructive: oklch(0.392 0.129 36.482);
  --destructive-foreground: oklch(0.872 0.067 39.237);
  --ring: oklch(0.331 0.034 159.723);
  --chart-1: oklch(0.331 0.034 159.723);
  --chart-2: oklch(0.935 0.008 162.413);
  --chart-3: oklch(0.935 0.008 162.413);
  --chart-4: oklch(0.957 0.005 162.486);
  --chart-5: oklch(0.334 0.039 159.328);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.003 162.544);
  --muted: oklch(0.181 0.023 19.572);
  --muted-foreground: oklch(0.729 0.018 17.565);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.003 162.544);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.979 0.003 162.544);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.331 0.034 159.723);
  --primary-foreground: oklch(0.852 0.031 161.693);
  --secondary: oklch(0.301 0 189.462);
  --secondary-foreground: oklch(0.829 0 180);
  --accent: oklch(0.301 0 189.462);
  --accent-foreground: oklch(0.829 0 180);
  --destructive: oklch(0.688 0.191 38.089);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.331 0.034 159.723);
  --chart-1: oklch(0.331 0.034 159.723);
  --chart-2: oklch(0.301 0 189.462);
  --chart-3: oklch(0.301 0 189.462);
  --chart-4: oklch(0.331 0 180);
  --chart-5: oklch(0.334 0.039 159.328);
}