Semantics for shadcn/ui

Semantics is a shadcn/ui theme built around a yellow primary color (#cec0a1) with green accents (#c6cea1). The light mode uses a neutral background (#fefdfb). Dark mode keeps the yellow primary (#cec0a1) on a yellow-tinted background (#0c0904).

Color palette

TokenLightDark
Background
#fefdfbsnow
#0c0904black
Foreground
#100c05black
#ffffffwhite
Card
#fefdfbsnow
#0c0904black
Card foreground
#100c05black
#ffffffwhite
Popover
#fefdfbsnow
#0c0904black
Popover foreground
#100c05black
#ffffffwhite
Primary
#cec0a1tan
#cec0a1tan
Primary foreground
#282215black
#282215black
Secondary
#cea9a1tan
#cea9a1tan
Secondary foreground
#281815black
#281815black
Muted
#e3dfdegainsboro
#211d1cblack
Muted foreground
#51413ddarkslategray
#c2b1aesilver
Accent
#c6cea1silver
#c6cea1silver
Accent foreground
#252815black
#252815black
Destructive
#602106maroon
#e74f0dorangered
Destructive foreground
#f9ba9flightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cec0a1tan
#cec0a1tan

Contrast

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

Light mode
Text on background19.17:1AAA
Text on card19.17:1AAA
Primary button8.78:1AAA
Secondary button7.98:1AAA
Muted text7.29:1AAA
Accent9.17:1AAA
Destructive7.29:1AAA
Dark mode
Text on background19.87:1AAA
Text on card19.87:1AAA
Primary button8.78:1AAA
Secondary button7.98:1AAA
Muted text8.10:1AAA
Accent9.17:1AAA
Destructive3.79:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 86.018);
  --foreground: oklch(0.157 0.018 88.531);
  --muted: oklch(0.906 0.005 32.661);
  --muted-foreground: oklch(0.392 0.024 32.804);
  --popover: oklch(0.994 0.003 86.018);
  --popover-foreground: oklch(0.157 0.018 88.531);
  --card: oklch(0.994 0.003 86.018);
  --card-foreground: oklch(0.157 0.018 88.531);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.812 0.045 86.077);
  --primary-foreground: oklch(0.256 0.025 85.794);
  --secondary: oklch(0.766 0.046 32.8);
  --secondary-foreground: oklch(0.231 0.027 33.149);
  --accent: oklch(0.835 0.062 116.198);
  --accent-foreground: oklch(0.269 0.034 117.227);
  --destructive: oklch(0.341 0.099 40.481);
  --destructive-foreground: oklch(0.84 0.083 44.221);
  --ring: oklch(0.812 0.045 86.077);
  --chart-1: oklch(0.812 0.045 86.077);
  --chart-2: oklch(0.766 0.046 32.8);
  --chart-3: oklch(0.835 0.062 116.198);
  --chart-4: oklch(0.792 0.04 32.763);
  --chart-5: oklch(0.815 0.049 86.063);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.016 91.09);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.235 0.006 32.688);
  --muted-foreground: oklch(0.774 0.02 32.683);
  --popover: oklch(0.141 0.016 91.09);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.141 0.016 91.09);
  --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.812 0.045 86.077);
  --primary-foreground: oklch(0.256 0.025 85.794);
  --secondary: oklch(0.766 0.046 32.8);
  --secondary-foreground: oklch(0.231 0.027 33.149);
  --accent: oklch(0.835 0.062 116.198);
  --accent-foreground: oklch(0.269 0.034 117.227);
  --destructive: oklch(0.631 0.199 38.577);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.812 0.045 86.077);
  --chart-1: oklch(0.812 0.045 86.077);
  --chart-2: oklch(0.766 0.046 32.8);
  --chart-3: oklch(0.835 0.062 116.198);
  --chart-4: oklch(0.792 0.04 32.763);
  --chart-5: oklch(0.815 0.049 86.063);
}