Yellow theme for shadcn/ui

Yellow theme is a shadcn/ui theme built around a vivid yellow primary color (#f9d624) with near-white accents (#ebebea). The light mode uses a neutral background (#fefdfb). Dark mode keeps the vivid yellow primary (#f9d624) on a yellow-tinted background (#0b0a05).

Color palette

TokenLightDark
Background
#fefdfbsnow
#0b0a05black
Foreground
#100e05black
#fdfdfcwhite
Card
#fdfcf7snow
#0e0d06black
Card foreground
#0c0a03black
#ffffffwhite
Popover
#fefdfbsnow
#0b0a05black
Popover foreground
#100e05black
#fdfdfcwhite
Primary
#f9d624gold
#f9d624gold
Primary foreground
#504302darkolivegreen
#504302darkolivegreen
Secondary
#ebebealinen
#151514black
Secondary foreground
#525251darkslategray
#aeaeaddarkgray
Muted
#ebe9e0beige
#1f1d14black
Muted foreground
#504d3fdarkolivegreen
#c0bdafsilver
Accent
#ebebealinen
#151514black
Accent foreground
#525251darkslategray
#aeaeaddarkgray
Destructive
#dd0808red
#f83030crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#ecece9linen
#1f1e1ablack
Input
#ecece9linen
#1f1e1ablack
Ring
#f9d624gold
#f9d624gold

Contrast

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

Light mode
Text on background19.03:1AAA
Text on card19.22:1AAA
Primary button6.84:1AA
Secondary button6.54:1AA
Muted text6.96:1AA
Accent6.54:1AA
Destructive5.08:1AA
Dark mode
Text on background19.50:1AAA
Text on card19.47:1AAA
Primary button6.84:1AA
Secondary button8.25:1AAA
Muted text8.96:1AAA
Accent8.25:1AAA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 97.299);
  --foreground: oklch(0.162 0.02 99.498);
  --muted: oklch(0.933 0.011 97.422);
  --muted-foreground: oklch(0.419 0.023 97.909);
  --popover: oklch(0.995 0.003 97.299);
  --popover-foreground: oklch(0.162 0.02 99.498);
  --card: oklch(0.99 0.006 97.339);
  --card-foreground: oklch(0.146 0.018 100.612);
  --border: oklch(0.942 0.004 97.318);
  --input: oklch(0.942 0.004 97.318);
  --primary: oklch(0.88 0.175 96.303);
  --primary-foreground: oklch(0.384 0.078 96.293);
  --secondary: oklch(0.939 0 97.266);
  --secondary-foreground: oklch(0.439 0.002 97.327);
  --accent: oklch(0.939 0 97.266);
  --accent-foreground: oklch(0.439 0.002 97.327);
  --destructive: oklch(0.566 0.23 28.963);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.88 0.175 96.303);
  --chart-1: oklch(0.88 0.175 96.303);
  --chart-2: oklch(0.939 0 97.266);
  --chart-3: oklch(0.939 0 97.266);
  --chart-4: oklch(0.962 0 97.263);
  --chart-5: oklch(0.887 0.177 96.119);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.013 100.061);
  --foreground: oklch(0.993 0.001 97.276);
  --muted: oklch(0.229 0.016 98.035);
  --muted-foreground: oklch(0.798 0.02 97.58);
  --popover: oklch(0.142 0.013 100.061);
  --popover-foreground: oklch(0.993 0.001 97.276);
  --card: oklch(0.157 0.014 98.915);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.233 0.008 97.687);
  --input: oklch(0.233 0.008 97.687);
  --primary: oklch(0.88 0.175 96.303);
  --primary-foreground: oklch(0.384 0.078 96.293);
  --secondary: oklch(0.194 0.001 97.307);
  --secondary-foreground: oklch(0.75 0.002 97.294);
  --accent: oklch(0.194 0.001 97.307);
  --accent-foreground: oklch(0.75 0.002 97.294);
  --destructive: oklch(0.634 0.232 27.036);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.88 0.175 96.303);
  --chart-1: oklch(0.88 0.175 96.303);
  --chart-2: oklch(0.194 0.001 97.307);
  --chart-3: oklch(0.194 0.001 97.307);
  --chart-4: oklch(0.227 0.001 97.313);
  --chart-5: oklch(0.887 0.177 96.119);
}