Sad for shadcn/ui

Sad is a shadcn/ui theme built around a muted deep green primary color (#383d29) with muted deep green accents (#2e3d29). The light mode uses a neutral background (#fdfefb). Dark mode keeps the muted deep green primary (#383d29) on a neutral background (#030402).

Color palette

TokenLightDark
Background
#fdfefbwhite
#030402black
Foreground
#0a0d02black
#fafaf9snow
Card
#fdfefbwhite
#030402black
Card foreground
#0a0d02black
#fafaf9snow
Popover
#fdfefbwhite
#030402black
Popover foreground
#0a0d02black
#fafaf9snow
Primary
#383d29darkslategray
#383d29darkslategray
Primary foreground
#d1d6c2lightgrey
#d1d6c2lightgrey
Secondary
#3d3829darkslategray
#3d3829darkslategray
Secondary foreground
#d6d1c2lightgrey
#d6d1c2lightgrey
Muted
#e3decfgainsboro
#302b1cdarkslategray
Muted foreground
#666152dimgray
#ada899darkgray
Accent
#2e3d29darkslategray
#2e3d29darkslategray
Accent foreground
#c7d6c2lightgrey
#c7d6c2lightgrey
Destructive
#b54e12sienna
#ea702achocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#383d29darkslategray
#383d29darkslategray

Contrast

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

Light mode
Text on background19.36:1AAA
Text on card19.36:1AAA
Primary button7.58:1AAA
Secondary button7.67:1AAA
Muted text4.58:1AA
Accent7.63:1AAA
Destructive5.17:1AA
Dark mode
Text on background19.71:1AAA
Text on card19.71:1AAA
Primary button7.58:1AAA
Secondary button7.67:1AAA
Muted text5.92:1AA
Accent7.63:1AAA
Destructive6.84:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 117.898);
  --foreground: oklch(0.152 0.027 118.753);
  --muted: oklch(0.9 0.021 91.596);
  --muted-foreground: oklch(0.492 0.024 91.747);
  --popover: oklch(0.996 0.004 117.898);
  --popover-foreground: oklch(0.152 0.027 118.753);
  --card: oklch(0.996 0.004 117.898);
  --card-foreground: oklch(0.152 0.027 118.753);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.348 0.033 119.529);
  --primary-foreground: oklch(0.866 0.027 118.372);
  --secondary: oklch(0.341 0.025 91.813);
  --secondary-foreground: oklch(0.86 0.02 91.601);
  --accent: oklch(0.34 0.038 137.995);
  --accent-foreground: oklch(0.859 0.031 137.825);
  --destructive: oklch(0.549 0.149 44.845);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.348 0.033 119.529);
  --chart-1: oklch(0.348 0.033 119.529);
  --chart-2: oklch(0.341 0.025 91.813);
  --chart-3: oklch(0.34 0.038 137.995);
  --chart-4: oklch(0.373 0.028 91.815);
  --chart-5: oklch(0.353 0.037 119.769);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.011 117.973);
  --foreground: oklch(0.986 0.001 117.849);
  --muted: oklch(0.291 0.026 91.802);
  --muted-foreground: oklch(0.732 0.022 91.644);
  --popover: oklch(0.1 0.011 117.973);
  --popover-foreground: oklch(0.986 0.001 117.849);
  --card: oklch(0.1 0.011 117.973);
  --card-foreground: oklch(0.986 0.001 117.849);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.348 0.033 119.529);
  --primary-foreground: oklch(0.866 0.027 118.372);
  --secondary: oklch(0.341 0.025 91.813);
  --secondary-foreground: oklch(0.86 0.02 91.601);
  --accent: oklch(0.34 0.038 137.995);
  --accent-foreground: oklch(0.859 0.031 137.825);
  --destructive: oklch(0.68 0.17 46.496);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.348 0.033 119.529);
  --chart-1: oklch(0.348 0.033 119.529);
  --chart-2: oklch(0.341 0.025 91.813);
  --chart-3: oklch(0.34 0.038 137.995);
  --chart-4: oklch(0.373 0.028 91.815);
  --chart-5: oklch(0.353 0.037 119.769);
}