Understated for shadcn/ui

Understated is a shadcn/ui theme built around a neutral gray primary color (#343332) with neutral gray accents (#323334). The light mode uses a neutral background (#fdfcfb). Dark mode keeps the neutral gray primary (#343332) on a red-tinted background (#0c0504).

Color palette

TokenLightDark
Background
#fdfcfbsnow
#0c0504black
Foreground
#090201black
#ffffffwhite
Card
#fdfcfbsnow
#0c0504black
Card foreground
#090201black
#ffffffwhite
Popover
#fdfcfbsnow
#0c0504black
Popover foreground
#090201black
#ffffffwhite
Primary
#343332darkslategray
#343332darkslategray
Primary foreground
#cdcccblightgrey
#cdcccblightgrey
Secondary
#323334darkslategray
#323334darkslategray
Secondary foreground
#cbcccdlightgrey
#cbcccdlightgrey
Muted
#e0e5e5gainsboro
#1a1e1fblack
Muted foreground
#506468dimgray
#97acafdarkgray
Accent
#323334darkslategray
#323334darkslategray
Accent foreground
#cbcccdlightgrey
#cbcccdlightgrey
Destructive
#cf0c02firebrick
#fc0f03red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#343332darkslategray
#343332darkslategray

Contrast

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

Light mode
Text on background20.06:1AAA
Text on card20.06:1AAA
Primary button7.89:1AAA
Secondary button7.83:1AAA
Muted text4.90:1AA
Accent7.83:1AAA
Destructive5.66:1AA
Dark mode
Text on background20.23:1AAA
Text on card20.23:1AAA
Primary button7.89:1AAA
Secondary button7.83:1AAA
Muted text7.09:1AAA
Accent7.83: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.992 0.002 29.474);
  --foreground: oklch(0.106 0.022 39.551);
  --muted: oklch(0.918 0.005 209.455);
  --muted-foreground: oklch(0.488 0.025 209.479);
  --popover: oklch(0.992 0.002 29.474);
  --popover-foreground: oklch(0.106 0.022 39.551);
  --card: oklch(0.992 0.002 29.474);
  --card-foreground: oklch(0.106 0.022 39.551);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.321 0.001 29.481);
  --primary-foreground: oklch(0.845 0.001 29.472);
  --secondary: oklch(0.322 0.001 209.458);
  --secondary-foreground: oklch(0.846 0.001 209.465);
  --accent: oklch(0.322 0.001 209.458);
  --accent-foreground: oklch(0.846 0.001 209.465);
  --destructive: oklch(0.54 0.217 29.66);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.321 0.001 29.481);
  --chart-1: oklch(0.321 0.001 29.481);
  --chart-2: oklch(0.322 0.001 209.458);
  --chart-3: oklch(0.322 0.001 209.458);
  --chart-4: oklch(0.352 0.001 209.458);
  --chart-5: oklch(0.319 0.005 29.528);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.016 34.688);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.23 0.007 209.43);
  --muted-foreground: oklch(0.728 0.023 209.432);
  --popover: oklch(0.125 0.016 34.688);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.125 0.016 34.688);
  --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.321 0.001 29.481);
  --primary-foreground: oklch(0.845 0.001 29.472);
  --secondary: oklch(0.322 0.001 209.458);
  --secondary-foreground: oklch(0.846 0.001 209.465);
  --accent: oklch(0.322 0.001 209.458);
  --accent-foreground: oklch(0.846 0.001 209.465);
  --destructive: oklch(0.626 0.253 29.582);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.321 0.001 29.481);
  --chart-1: oklch(0.321 0.001 29.481);
  --chart-2: oklch(0.322 0.001 209.458);
  --chart-3: oklch(0.322 0.001 209.458);
  --chart-4: oklch(0.352 0.001 209.458);
  --chart-5: oklch(0.319 0.005 29.528);
}