Subdued for shadcn/ui

Subdued is a shadcn/ui theme built around a muted deep purple primary color (#161216) with muted deep green accents (#121612). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the muted deep purple primary (#161216) on a purple-tinted background (#0c030c).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#0c030cblack
Foreground
#140514black
#fdfcfdwhite
Card
#fcf8fcsnow
#100410black
Card foreground
#100410black
#ffffffwhite
Popover
#fcf8fcsnow
#100410black
Popover foreground
#100410black
#ffffffwhite
Primary
#161216black
#161216black
Primary foreground
#b6a5b5darkgray
#b6a5b5darkgray
Secondary
#121612black
#121612black
Secondary foreground
#a5b6a6darkgray
#a5b6a6darkgray
Muted
#daecdagainsboro
#132513black
Muted foreground
#595959dimgray
#a6a6a6darkgray
Accent
#121612black
#121612black
Accent foreground
#a5b6a6darkgray
#a5b6a6darkgray
Destructive
#911603darkred
#fa3719orangered
Destructive foreground
#fecfc8pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#161216black
#161216black

Contrast

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

Light mode
Text on background19.28:1AAA
Text on card19.06:1AAA
Primary button7.95:1AAA
Secondary button8.53:1AAA
Muted text5.66:1AA
Accent8.53:1AAA
Destructive6.45:1AA
Dark mode
Text on background19.82:1AAA
Text on card20.02:1AAA
Primary button7.95:1AAA
Secondary button8.53:1AAA
Muted text6.62:1AA
Accent8.53:1AAA
Destructive3.72:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 326.081);
  --foreground: oklch(0.152 0.039 327.866);
  --muted: oklch(0.925 0.03 145.783);
  --muted-foreground: oklch(0.465 0 180);
  --popover: oklch(0.983 0.007 326.108);
  --popover-foreground: oklch(0.139 0.034 327.76);
  --card: oklch(0.983 0.007 326.108);
  --card-foreground: oklch(0.139 0.034 327.76);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.191 0.01 326.478);
  --primary-foreground: oklch(0.742 0.029 326.367);
  --secondary: oklch(0.196 0.01 145.623);
  --secondary-foreground: oklch(0.758 0.029 145.737);
  --accent: oklch(0.196 0.01 145.623);
  --accent-foreground: oklch(0.758 0.029 145.737);
  --destructive: oklch(0.423 0.159 31.529);
  --destructive-foreground: oklch(0.893 0.054 28.362);
  --ring: oklch(0.191 0.01 326.478);
  --chart-1: oklch(0.191 0.01 326.478);
  --chart-2: oklch(0.196 0.01 145.623);
  --chart-3: oklch(0.196 0.01 145.623);
  --chart-4: oklch(0.231 0.013 145.57);
  --chart-5: oklch(0.19 0.013 326.603);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.029 327.648);
  --foreground: oklch(0.992 0.001 326.063);
  --muted: oklch(0.243 0.041 144.559);
  --muted-foreground: oklch(0.724 0 180);
  --popover: oklch(0.139 0.034 327.76);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.034 327.76);
  --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.191 0.01 326.478);
  --primary-foreground: oklch(0.742 0.029 326.367);
  --secondary: oklch(0.196 0.01 145.623);
  --secondary-foreground: oklch(0.758 0.029 145.737);
  --accent: oklch(0.196 0.01 145.623);
  --accent-foreground: oklch(0.758 0.029 145.737);
  --destructive: oklch(0.642 0.233 31.529);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.191 0.01 326.478);
  --chart-1: oklch(0.191 0.01 326.478);
  --chart-2: oklch(0.196 0.01 145.623);
  --chart-3: oklch(0.196 0.01 145.623);
  --chart-4: oklch(0.231 0.013 145.57);
  --chart-5: oklch(0.19 0.013 326.603);
}