Understated for shadcn/ui

Understated is a shadcn/ui theme built around a muted purple primary color (#b18fb3) with muted pink accents (#b38fa2). The light mode uses a neutral background (#fefbfe). Dark mode keeps the muted purple primary (#b18fb3) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#fefbfewhite
#040104black
Foreground
#0d020dblack
#ffffffwhite
Card
#fdf6fdsnow
#080208black
Card foreground
#080109black
#ffffffwhite
Popover
#fdf6fdsnow
#080208black
Popover foreground
#080109black
#ffffffwhite
Primary
#b18fb3darkgray
#b18fb3darkgray
Primary foreground
#090609black
#090609black
Secondary
#9f8fb3darkgray
#9f8fb3darkgray
Secondary foreground
#080609black
#080609black
Muted
#efedf2whitesmoke
#0f0d12black
Muted foreground
#615e64dimgray
#9e9ba1darkgray
Accent
#b38fa2rosybrown
#b38fa2rosybrown
Accent foreground
#090608black
#090608black
Destructive
#db0906red
#f91e1ared
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b18fb3darkgray
#b18fb3darkgray

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.46:1AAA
Primary button7.12:1AAA
Secondary button6.75:1AA
Muted text5.49:1AA
Accent7.05:1AAA
Destructive5.18:1AA
Dark mode
Text on background20.76:1AAA
Text on card20.52:1AAA
Primary button7.12:1AAA
Secondary button6.75:1AA
Muted text7.05:1AAA
Accent7.05:1AAA
Destructive4.01:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.006 324.165);
  --foreground: oklch(0.121 0.038 326.126);
  --muted: oklch(0.95 0.007 306.329);
  --muted-foreground: oklch(0.486 0.01 306.173);
  --popover: oklch(0.981 0.012 324.2);
  --popover-foreground: oklch(0.105 0.033 326.303);
  --card: oklch(0.981 0.012 324.2);
  --card-foreground: oklch(0.105 0.033 326.303);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.692 0.064 324.647);
  --primary-foreground: oklch(0.13 0.009 324.692);
  --secondary: oklch(0.676 0.055 305.386);
  --secondary-foreground: oklch(0.127 0.008 306.822);
  --accent: oklch(0.688 0.051 344.342);
  --accent-foreground: oklch(0.129 0.007 342.608);
  --destructive: oklch(0.562 0.227 29.192);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.692 0.064 324.647);
  --chart-1: oklch(0.692 0.064 324.647);
  --chart-2: oklch(0.676 0.055 305.386);
  --chart-3: oklch(0.688 0.051 344.342);
  --chart-4: oklch(0.703 0.05 305.517);
  --chart-5: oklch(0.691 0.075 324.725);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.02 325.821);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.163 0.011 305.535);
  --muted-foreground: oklch(0.694 0.009 306.265);
  --popover: oklch(0.108 0.025 325.821);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.108 0.025 325.821);
  --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.692 0.064 324.647);
  --primary-foreground: oklch(0.13 0.009 324.692);
  --secondary: oklch(0.676 0.055 305.386);
  --secondary-foreground: oklch(0.127 0.008 306.822);
  --accent: oklch(0.688 0.051 344.342);
  --accent-foreground: oklch(0.129 0.007 342.608);
  --destructive: oklch(0.625 0.245 28.647);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.692 0.064 324.647);
  --chart-1: oklch(0.692 0.064 324.647);
  --chart-2: oklch(0.676 0.055 305.386);
  --chart-3: oklch(0.688 0.051 344.342);
  --chart-4: oklch(0.703 0.05 305.517);
  --chart-5: oklch(0.691 0.075 324.725);
}