Sadness for shadcn/ui

Sadness is a shadcn/ui theme built around an orange primary color (#78543b) with violet accents (#543b78). The light mode uses a neutral background (#fefcfb). Dark mode keeps the orange primary (#78543b) on an orange-tinted background (#100905).

Color palette

TokenLightDark
Background
#fefcfbsnow
#100905black
Foreground
#000000black
#fbfaf9snow
Card
#fdf9f7snow
#130c06black
Card foreground
#000000black
#fdfcfcsnow
Popover
#fefcfbsnow
#100905black
Popover foreground
#000000black
#fbfaf9snow
Primary
#78543bsienna
#78543bsienna
Primary foreground
#f7f2eewhitesmoke
#f7f2eewhitesmoke
Secondary
#3b7854seagreen
#3b7854seagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eceeedwhitesmoke
#111312black
Muted foreground
#415348darkslategray
#acbeb4silver
Accent
#543b78darkslateblue
#543b78darkslateblue
Accent foreground
#f2eef7whitesmoke
#f2eef7whitesmoke
Destructive
#620c04maroon
#f64231tomato
Destructive foreground
#fba59dlightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#78543bsienna
#78543bsienna

Contrast

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

Light mode
Text on background20.55:1AAA
Text on card20.11:1AAA
Primary button6.03:1AA
Secondary button5.27:1AA
Muted text7.06:1AAA
Accent8.07:1AAA
Destructive6.97:1AA
Dark mode
Text on background18.93:1AAA
Text on card18.95:1AAA
Primary button6.03:1AA
Secondary button5.27:1AA
Muted text9.58:1AAA
Accent8.07:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.003 58.325);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.948 0.003 160.943);
  --muted-foreground: oklch(0.423 0.028 159.351);
  --popover: oklch(0.993 0.003 58.325);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.985 0.005 58.288);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.478 0.061 56.249);
  --primary-foreground: oklch(0.963 0.007 58.257);
  --secondary: oklch(0.52 0.085 156.186);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.409 0.101 301.304);
  --accent-foreground: oklch(0.954 0.012 304.869);
  --destructive: oklch(0.32 0.12 30.474);
  --destructive-foreground: oklch(0.804 0.103 25.296);
  --ring: oklch(0.478 0.061 56.249);
  --chart-1: oklch(0.478 0.061 56.249);
  --chart-2: oklch(0.52 0.085 156.186);
  --chart-3: oklch(0.409 0.101 301.304);
  --chart-4: oklch(0.552 0.091 156.135);
  --chart-5: oklch(0.48 0.066 55.99);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.148 0.016 62.663);
  --foreground: oklch(0.985 0.001 58.346);
  --muted: oklch(0.183 0.004 160.461);
  --muted-foreground: oklch(0.785 0.024 160.265);
  --popover: oklch(0.148 0.016 62.663);
  --popover-foreground: oklch(0.985 0.001 58.346);
  --card: oklch(0.161 0.018 59.233);
  --card-foreground: oklch(0.992 0.001 58.354);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.478 0.061 56.249);
  --primary-foreground: oklch(0.963 0.007 58.257);
  --secondary: oklch(0.52 0.085 156.186);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.409 0.101 301.304);
  --accent-foreground: oklch(0.954 0.012 304.869);
  --destructive: oklch(0.645 0.219 29.565);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.478 0.061 56.249);
  --chart-1: oklch(0.478 0.061 56.249);
  --chart-2: oklch(0.52 0.085 156.186);
  --chart-3: oklch(0.409 0.101 301.304);
  --chart-4: oklch(0.552 0.091 156.135);
  --chart-5: oklch(0.48 0.066 55.99);
}