Sad for shadcn/ui

Sad is a shadcn/ui theme built around a yellow primary color (#dbdb85) with green accents (#b0db85). The light mode uses a neutral background (#ffffff). Dark mode keeps the yellow primary (#dbdb85) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#ffffffwhite
#070703black
Foreground
#121203black
#fdfdfcwhite
Card
#ffffffwhite
#070703black
Card foreground
#121203black
#fdfdfcwhite
Popover
#ffffffwhite
#070703black
Popover foreground
#121203black
#fdfdfcwhite
Primary
#dbdb85khaki
#dbdb85khaki
Primary foreground
#23230bblack
#23230bblack
Secondary
#dbb085burlywood
#dbb085burlywood
Secondary foreground
#23170bblack
#23170bblack
Muted
#e2e0dfgainsboro
#201f1dblack
Muted foreground
#5d544bdarkolivegreen
#b4aba2darkgray
Accent
#b0db85lightgreen
#b0db85lightgreen
Accent foreground
#17230bblack
#17230bblack
Destructive
#d34912chocolate
#d34912chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dbdb85khaki
#dbdb85khaki

Contrast

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

Light mode
Text on background18.85:1AAA
Text on card18.85:1AAA
Primary button10.96:1AAA
Secondary button8.79:1AAA
Muted text5.64:1AA
Accent10.36:1AAA
Destructive4.43:1AA Large
Dark mode
Text on background19.82:1AAA
Text on card19.82:1AAA
Primary button10.96:1AAA
Secondary button8.79:1AAA
Muted text7.30:1AAA
Accent10.36:1AAA
Destructive4.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.176 0.031 109.192);
  --muted: oklch(0.909 0.003 67.783);
  --muted-foreground: oklch(0.453 0.019 67.313);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.176 0.031 109.192);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.176 0.031 109.192);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.871 0.108 108.44);
  --primary-foreground: oklch(0.251 0.04 108.986);
  --secondary: oklch(0.785 0.076 66.354);
  --secondary-foreground: oklch(0.217 0.03 65.174);
  --accent: oklch(0.84 0.121 130.279);
  --accent-foreground: oklch(0.239 0.046 131.175);
  --destructive: oklch(0.591 0.184 38.392);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.871 0.108 108.44);
  --chart-1: oklch(0.871 0.108 108.44);
  --chart-2: oklch(0.785 0.076 66.354);
  --chart-3: oklch(0.84 0.121 130.279);
  --chart-4: oklch(0.806 0.068 66.607);
  --chart-5: oklch(0.878 0.113 108.514);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.012 107.969);
  --foreground: oklch(0.993 0.001 106.419);
  --muted: oklch(0.239 0.004 67.612);
  --muted-foreground: oklch(0.746 0.017 67.565);
  --popover: oklch(0.126 0.012 107.969);
  --popover-foreground: oklch(0.993 0.001 106.419);
  --card: oklch(0.126 0.012 107.969);
  --card-foreground: oklch(0.993 0.001 106.419);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.871 0.108 108.44);
  --primary-foreground: oklch(0.251 0.04 108.986);
  --secondary: oklch(0.785 0.076 66.354);
  --secondary-foreground: oklch(0.217 0.03 65.174);
  --accent: oklch(0.84 0.121 130.279);
  --accent-foreground: oklch(0.239 0.046 131.175);
  --destructive: oklch(0.591 0.184 38.392);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.871 0.108 108.44);
  --chart-1: oklch(0.871 0.108 108.44);
  --chart-2: oklch(0.785 0.076 66.354);
  --chart-3: oklch(0.84 0.121 130.279);
  --chart-4: oklch(0.806 0.068 66.607);
  --chart-5: oklch(0.878 0.113 108.514);
}