Yellow for shadcn/ui

Yellow is a shadcn/ui theme built around a neutral gray primary color (#a8a8a3) with muted light yellow accents (#eeede7). The light mode uses a neutral background (#fefefb). Dark mode keeps the neutral gray primary (#a8a8a3) on a yellow-tinted background (#0f0d06).

Color palette

TokenLightDark
Background
#fefefbwhite
#0f0d06black
Foreground
#110f03black
#f9f8f6whitesmoke
Card
#fdfcf6snow
#121107black
Card foreground
#0d0b03black
#fbfaf9snow
Popover
#fdfcf6snow
#121107black
Popover foreground
#0d0b03black
#fbfaf9snow
Primary
#a8a8a3darkgray
#a8a8a3darkgray
Primary foreground
#0d0d0cblack
#0d0d0cblack
Secondary
#eeede7linen
#2c2c2adarkslategray
Secondary foreground
#242219black
#c6c5c3silver
Muted
#e7e3cfgainsboro
#302c18darkslategray
Muted foreground
#6e6b5edimgray
#a19e91darkgray
Accent
#eeede7linen
#2c2c2adarkslategray
Accent foreground
#242219black
#c6c5c3silver
Destructive
#d1350afirebrick
#f44515orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a8a8a3darkgray
#a8a8a3darkgray

Contrast

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

Light mode
Text on background18.96:1AAA
Text on card19.20:1AAA
Primary button8.12:1AAA
Secondary button13.59:1AAA
Muted text4.16:1AA Large
Accent13.59:1AAA
Destructive4.95:1AA
Dark mode
Text on background18.29:1AAA
Text on card18.19:1AAA
Primary button8.12:1AAA
Secondary button8.10:1AAA
Muted text5.22:1AA
Accent8.10:1AAA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 97.312);
  --foreground: oklch(0.166 0.024 99.862);
  --muted: oklch(0.915 0.027 97.637);
  --muted-foreground: oklch(0.528 0.021 97.749);
  --popover: oklch(0.991 0.008 97.365);
  --popover-foreground: oklch(0.148 0.021 100.975);
  --card: oklch(0.991 0.008 97.365);
  --card-foreground: oklch(0.148 0.021 100.975);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.73 0.006 97.376);
  --primary-foreground: oklch(0.159 0.001 97.372);
  --secondary: oklch(0.945 0.008 97.376);
  --secondary-foreground: oklch(0.252 0.017 98.012);
  --accent: oklch(0.945 0.008 97.376);
  --accent-foreground: oklch(0.252 0.017 98.012);
  --destructive: oklch(0.568 0.198 34.172);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.73 0.006 97.376);
  --chart-1: oklch(0.73 0.006 97.376);
  --chart-2: oklch(0.945 0.008 97.376);
  --chart-3: oklch(0.945 0.008 97.376);
  --chart-4: oklch(0.966 0.005 97.331);
  --chart-5: oklch(0.735 0.013 97.486);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.159 0.017 99.141);
  --foreground: oklch(0.98 0.003 97.299);
  --muted: oklch(0.291 0.034 98.29);
  --muted-foreground: oklch(0.699 0.02 97.616);
  --popover: oklch(0.175 0.019 98.587);
  --popover-foreground: oklch(0.986 0.002 97.286);
  --card: oklch(0.175 0.019 98.587);
  --card-foreground: oklch(0.986 0.002 97.286);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.73 0.006 97.376);
  --primary-foreground: oklch(0.159 0.001 97.372);
  --secondary: oklch(0.293 0.003 97.378);
  --secondary-foreground: oklch(0.824 0.003 97.304);
  --accent: oklch(0.293 0.003 97.378);
  --accent-foreground: oklch(0.824 0.003 97.304);
  --destructive: oklch(0.643 0.218 34.691);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.73 0.006 97.376);
  --chart-1: oklch(0.73 0.006 97.376);
  --chart-2: oklch(0.293 0.003 97.378);
  --chart-3: oklch(0.293 0.003 97.378);
  --chart-4: oklch(0.324 0.003 97.383);
  --chart-5: oklch(0.735 0.013 97.486);
}