Ladder for shadcn/ui

Ladder is a shadcn/ui theme built around a muted green primary color (#4d7555) with muted purple accents (#754d6d). The light mode uses a neutral background (#f8fcf8). Dark mode keeps the muted green primary (#4d7555) on a neutral background (#020402).

Color palette

TokenLightDark
Background
#f8fcf8mintcream
#020402black
Foreground
#051007black
#f9fbf9mintcream
Card
#f8fcf8mintcream
#020402black
Card foreground
#051007black
#f9fbf9mintcream
Popover
#f8fcf8mintcream
#020402black
Popover foreground
#051007black
#f9fbf9mintcream
Primary
#4d7555dimgray
#4d7555dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#754d6ddimgray
#754d6ddimgray
Secondary foreground
#fbf9fbsnow
#fbf9fbsnow
Muted
#dbd6dagainsboro
#292428darkslategray
Muted foreground
#694f64dimgray
#b096abdarkgray
Accent
#754d6ddimgray
#754d6ddimgray
Accent foreground
#fbf9fbsnow
#fbf9fbsnow
Destructive
#b21010firebrick
#ec2222crimson
Destructive foreground
#fef6f6snow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4d7555dimgray
#4d7555dimgray

Contrast

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

Light mode
Text on background18.72:1AAA
Text on card18.72:1AAA
Primary button5.25:1AA
Secondary button6.61:1AA
Muted text5.05:1AA
Accent6.61:1AA
Destructive6.62:1AA
Dark mode
Text on background19.83:1AAA
Text on card19.83:1AAA
Primary button5.25:1AA
Secondary button6.61:1AA
Muted text5.68:1AA
Accent6.61:1AA
Destructive4.35:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.007 151.897);
  --foreground: oklch(0.156 0.025 150.553);
  --muted: oklch(0.882 0.008 332.144);
  --muted-foreground: oklch(0.462 0.046 333.42);
  --popover: oklch(0.987 0.007 151.897);
  --popover-foreground: oklch(0.156 0.025 150.553);
  --card: oklch(0.987 0.007 151.897);
  --card-foreground: oklch(0.156 0.025 150.553);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.524 0.069 149.813);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.475 0.072 334.109);
  --secondary-foreground: oklch(0.984 0.003 332.054);
  --accent: oklch(0.475 0.072 334.109);
  --accent-foreground: oklch(0.984 0.003 332.054);
  --destructive: oklch(0.486 0.191 28.375);
  --destructive-foreground: oklch(0.979 0.009 17.314);
  --ring: oklch(0.524 0.069 149.813);
  --chart-1: oklch(0.524 0.069 149.813);
  --chart-2: oklch(0.475 0.072 334.109);
  --chart-3: oklch(0.475 0.072 334.109);
  --chart-4: oklch(0.501 0.077 334.128);
  --chart-5: oklch(0.529 0.078 149.507);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.011 151.417);
  --foreground: oklch(0.986 0.003 151.966);
  --muted: oklch(0.266 0.011 332.611);
  --muted-foreground: oklch(0.704 0.042 332.859);
  --popover: oklch(0.096 0.011 151.417);
  --popover-foreground: oklch(0.986 0.003 151.966);
  --card: oklch(0.096 0.011 151.417);
  --card-foreground: oklch(0.986 0.003 151.966);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.524 0.069 149.813);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.475 0.072 334.109);
  --secondary-foreground: oklch(0.984 0.003 332.054);
  --accent: oklch(0.475 0.072 334.109);
  --accent-foreground: oklch(0.984 0.003 332.054);
  --destructive: oklch(0.604 0.231 27.798);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.524 0.069 149.813);
  --chart-1: oklch(0.524 0.069 149.813);
  --chart-2: oklch(0.475 0.072 334.109);
  --chart-3: oklch(0.475 0.072 334.109);
  --chart-4: oklch(0.501 0.077 334.128);
  --chart-5: oklch(0.529 0.078 149.507);
}