Understated for shadcn/ui

Understated is a shadcn/ui theme built around a near-black primary color (#0c0d0d) with near-black accents (#0d0c0d). The light mode uses a neutral background (#f6fdfa). Dark mode keeps the near-black primary (#0c0d0d) on a neutral background (#030705).

Color palette

TokenLightDark
Background
#f6fdfamintcream
#030705black
Foreground
#04100ablack
#fcfdfcwhite
Card
#f6fdfamintcream
#030705black
Card foreground
#04100ablack
#fcfdfcwhite
Popover
#f6fdfamintcream
#030705black
Popover foreground
#04100ablack
#fcfdfcwhite
Primary
#0c0d0dblack
#0c0d0dblack
Primary foreground
#a1aaa5darkgray
#a1aaa5darkgray
Secondary
#0d0c0dblack
#0d0c0dblack
Secondary foreground
#aaa1a6darkgray
#aaa1a6darkgray
Muted
#f0e0e9mistyrose
#1f0f17black
Muted foreground
#654e5adimgray
#b19aa7darkgray
Accent
#0d0c0dblack
#0d0c0dblack
Accent foreground
#aaa1a6darkgray
#aaa1a6darkgray
Destructive
#780907maroon
#f2201ccrimson
Destructive foreground
#fbb8b7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0c0d0dblack
#0c0d0dblack

Contrast

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

Light mode
Text on background18.83:1AAA
Text on card18.83:1AAA
Primary button8.14:1AAA
Secondary button7.76:1AAA
Muted text5.94:1AA
Accent7.76:1AAA
Destructive6.84:1AA
Dark mode
Text on background19.87:1AAA
Text on card19.87:1AAA
Primary button8.14:1AAA
Secondary button7.76:1AAA
Muted text7.06:1AAA
Accent7.76:1AAA
Destructive4.20: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.989 0.009 163.216);
  --foreground: oklch(0.159 0.024 161.376);
  --muted: oklch(0.923 0.02 343.97);
  --muted-foreground: oklch(0.451 0.036 345.357);
  --popover: oklch(0.989 0.009 163.216);
  --popover-foreground: oklch(0.159 0.024 161.376);
  --card: oklch(0.989 0.009 163.216);
  --card-foreground: oklch(0.159 0.024 161.376);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.159 0.003 163.037);
  --primary-foreground: oklch(0.73 0.012 163.019);
  --secondary: oklch(0.157 0.003 343.851);
  --secondary-foreground: oklch(0.719 0.012 343.868);
  --accent: oklch(0.157 0.003 343.851);
  --accent-foreground: oklch(0.719 0.012 343.868);
  --destructive: oklch(0.366 0.143 28.677);
  --destructive-foreground: oklch(0.844 0.078 19.941);
  --ring: oklch(0.159 0.003 163.037);
  --chart-1: oklch(0.159 0.003 163.037);
  --chart-2: oklch(0.157 0.003 343.851);
  --chart-3: oklch(0.157 0.003 343.851);
  --chart-4: oklch(0.191 0.004 343.951);
  --chart-5: oklch(0.16 0.004 162.792);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.011 163.49);
  --foreground: oklch(0.993 0.001 163.412);
  --muted: oklch(0.195 0.029 346.924);
  --muted-foreground: oklch(0.711 0.032 344.545);
  --popover: oklch(0.121 0.011 163.49);
  --popover-foreground: oklch(0.993 0.001 163.412);
  --card: oklch(0.121 0.011 163.49);
  --card-foreground: oklch(0.993 0.001 163.412);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.159 0.003 163.037);
  --primary-foreground: oklch(0.73 0.012 163.019);
  --secondary: oklch(0.157 0.003 343.851);
  --secondary-foreground: oklch(0.719 0.012 343.868);
  --accent: oklch(0.157 0.003 343.851);
  --accent-foreground: oklch(0.719 0.012 343.868);
  --destructive: oklch(0.613 0.238 28.503);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.159 0.003 163.037);
  --chart-1: oklch(0.159 0.003 163.037);
  --chart-2: oklch(0.157 0.003 343.851);
  --chart-3: oklch(0.157 0.003 343.851);
  --chart-4: oklch(0.191 0.004 343.951);
  --chart-5: oklch(0.16 0.004 162.792);
}