Lean for shadcn/ui

Lean is a shadcn/ui theme built around a muted indigo primary color (#5d5785) with muted light indigo accents (#cfcdda). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted indigo primary (#5d5785) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#030308black
#f6f5f9whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#030308black
#f6f5f9whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#030308black
#f6f5f9whitesmoke
Primary
#5d5785darkslateblue
#5d5785darkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cfcddalightgrey
#14131bblack
Secondary foreground
#343243darkslategray
#a5a1bfdarkgray
Muted
#e2e0f0lavender
#110f1fblack
Muted foreground
#504e5adarkslategray
#a7a5b1darkgray
Accent
#cfcddalightgrey
#14131bblack
Accent foreground
#343243darkslategray
#a5a1bfdarkgray
Destructive
#7f1c01maroon
#fe5425tomato
Destructive foreground
#ffc3b3lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5d5785darkslateblue
#5d5785darkslateblue

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.58:1AAA
Primary button6.66:1AA
Secondary button7.96:1AAA
Muted text6.28:1AA
Accent7.96:1AAA
Destructive6.63:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.34:1AAA
Primary button6.66:1AA
Secondary button7.44:1AAA
Muted text7.77:1AAA
Accent7.44:1AAA
Destructive6.50:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.019 290.787);
  --muted: oklch(0.914 0.021 292.118);
  --muted-foreground: oklch(0.431 0.019 291.686);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.099 0.019 290.787);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.099 0.019 290.787);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.481 0.073 289.449);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.854 0.018 292.146);
  --secondary-foreground: oklch(0.327 0.031 290.685);
  --accent: oklch(0.854 0.018 292.146);
  --accent-foreground: oklch(0.327 0.031 290.685);
  --destructive: oklch(0.392 0.138 34.736);
  --destructive-foreground: oklch(0.867 0.072 36.005);
  --ring: oklch(0.481 0.073 289.449);
  --chart-1: oklch(0.481 0.073 289.449);
  --chart-2: oklch(0.854 0.018 292.146);
  --chart-3: oklch(0.854 0.018 292.146);
  --chart-4: oklch(0.88 0.015 292.229);
  --chart-5: oklch(0.473 0.084 288.888);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.972 0.006 292.433);
  --muted: oklch(0.181 0.031 289.06);
  --muted-foreground: oklch(0.727 0.017 292.103);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.972 0.006 292.433);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.972 0.006 292.433);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.481 0.073 289.449);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.191 0.018 290.74);
  --secondary-foreground: oklch(0.722 0.043 291.389);
  --accent: oklch(0.191 0.018 290.74);
  --accent-foreground: oklch(0.722 0.043 291.389);
  --destructive: oklch(0.674 0.214 35.425);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.481 0.073 289.449);
  --chart-1: oklch(0.481 0.073 289.449);
  --chart-2: oklch(0.191 0.018 290.74);
  --chart-3: oklch(0.191 0.018 290.74);
  --chart-4: oklch(0.22 0.023 290.521);
  --chart-5: oklch(0.473 0.084 288.888);
}