Yellow for shadcn/ui

Yellow is a shadcn/ui theme built around a green primary color (#60b72a) with pink accents (#b72a60). The light mode uses a neutral background (#f9fcf8). Dark mode keeps the green primary (#60b72a) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#f9fcf8mintcream
#020401black
Foreground
#070c03black
#f7faf5whitesmoke
Card
#f7faf5whitesmoke
#040802black
Card foreground
#040802black
#f9fcf8mintcream
Popover
#f7faf5whitesmoke
#040802black
Popover foreground
#040802black
#f9fcf8mintcream
Primary
#60b72aolivedrab
#60b72aolivedrab
Primary foreground
#091104black
#091104black
Secondary
#2a60b7steelblue
#2a60b7steelblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eff1f6whitesmoke
#090c10black
Muted foreground
#525457dimgray
#a8aaaddarkgray
Accent
#b72a60mediumvioletred
#b72a60mediumvioletred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#af440esaddlebrown
#ed6521chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#60b72aolivedrab
#60b72aolivedrab

Contrast

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

Light mode
Text on background19.08:1AAA
Text on card19.15:1AAA
Primary button7.58:1AAA
Secondary button6.10:1AA
Muted text6.73:1AA
Accent5.99:1AA
Destructive5.77:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.50:1AAA
Primary button7.58:1AAA
Secondary button6.10:1AA
Muted text8.41:1AAA
Accent5.99:1AA
Destructive6.49:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 133.022);
  --foreground: oklch(0.145 0.025 131.615);
  --muted: oklch(0.959 0.006 259.941);
  --muted-foreground: oklch(0.444 0.006 259.945);
  --popover: oklch(0.981 0.008 133.04);
  --popover-foreground: oklch(0.126 0.021 131.43);
  --card: oklch(0.981 0.008 133.04);
  --card-foreground: oklch(0.126 0.021 131.43);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.698 0.191 136.423);
  --primary-foreground: oklch(0.163 0.031 132.505);
  --secondary: oklch(0.5 0.15 259.605);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.524 0.18 3.085);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.525 0.152 41.862);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.698 0.191 136.423);
  --chart-1: oklch(0.698 0.191 136.423);
  --chart-2: oklch(0.5 0.15 259.605);
  --chart-3: oklch(0.524 0.18 3.085);
  --chart-4: oklch(0.524 0.158 259.613);
  --chart-5: oklch(0.706 0.197 136.617);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.016 131.551);
  --foreground: oklch(0.981 0.008 133.042);
  --muted: oklch(0.153 0.01 259.782);
  --muted-foreground: oklch(0.738 0.005 259.941);
  --popover: oklch(0.125 0.02 131.551);
  --popover-foreground: oklch(0.988 0.005 133.023);
  --card: oklch(0.125 0.02 131.551);
  --card-foreground: oklch(0.988 0.005 133.023);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.698 0.191 136.423);
  --primary-foreground: oklch(0.163 0.031 132.505);
  --secondary: oklch(0.5 0.15 259.605);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.524 0.18 3.085);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.669 0.184 42.901);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.698 0.191 136.423);
  --chart-1: oklch(0.698 0.191 136.423);
  --chart-2: oklch(0.5 0.15 259.605);
  --chart-3: oklch(0.524 0.18 3.085);
  --chart-4: oklch(0.524 0.158 259.613);
  --chart-5: oklch(0.706 0.197 136.617);
}