Sorrowful for shadcn/ui

Sorrowful is a shadcn/ui theme built around a muted yellow primary color (#b7a580) with neutral gray accents (#e7e6e4). The light mode uses a neutral background (#fcfbf7). Dark mode keeps the muted yellow primary (#b7a580) on a yellow-tinted background (#0c0904).

Color palette

TokenLightDark
Background
#fcfbf7snow
#0c0904black
Foreground
#100c04black
#fbfaf9snow
Card
#fcfbf7snow
#0c0904black
Card foreground
#100c04black
#fbfaf9snow
Popover
#fcfbf7snow
#0c0904black
Popover foreground
#100c04black
#fbfaf9snow
Primary
#b7a580rosybrown
#b7a580rosybrown
Primary foreground
#030302black
#030302black
Secondary
#e7e6e4gainsboro
#3d3629darkslategray
Secondary foreground
#504e49darkslategray
#d6cfc2lightgrey
Muted
#f5f3efwhitesmoke
#100e0ablack
Muted foreground
#454340darkslategray
#bfbebasilver
Accent
#e7e6e4gainsboro
#3d3629darkslategray
Accent foreground
#504e49darkslategray
#d6cfc2lightgrey
Destructive
#973102saddlebrown
#f65104orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b7a580rosybrown
#b7a580rosybrown

Contrast

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

Light mode
Text on background18.82:1AAA
Text on card18.82:1AAA
Primary button8.55:1AAA
Secondary button6.65:1AA
Muted text8.92:1AAA
Accent6.65:1AA
Destructive7.62:1AAA
Dark mode
Text on background19.08:1AAA
Text on card19.08:1AAA
Primary button8.55:1AAA
Secondary button7.67:1AAA
Muted text10.37:1AAA
Accent7.67:1AAA
Destructive3.44:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.005 84.563);
  --foreground: oklch(0.157 0.019 87.241);
  --muted: oklch(0.966 0.006 84.567);
  --muted-foreground: oklch(0.384 0.006 84.586);
  --popover: oklch(0.988 0.005 84.563);
  --popover-foreground: oklch(0.157 0.019 87.241);
  --card: oklch(0.988 0.005 84.563);
  --card-foreground: oklch(0.157 0.019 87.241);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.728 0.055 84.425);
  --primary-foreground: oklch(0.095 0.006 87.723);
  --secondary: oklch(0.925 0.002 84.557);
  --secondary-foreground: oklch(0.423 0.007 84.586);
  --accent: oklch(0.925 0.002 84.557);
  --accent-foreground: oklch(0.423 0.007 84.586);
  --destructive: oklch(0.46 0.144 39.504);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.728 0.055 84.425);
  --chart-1: oklch(0.728 0.055 84.425);
  --chart-2: oklch(0.925 0.002 84.557);
  --chart-3: oklch(0.925 0.002 84.557);
  --chart-4: oklch(0.947 0.001 84.555);
  --chart-5: oklch(0.732 0.061 84.364);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.015 89.654);
  --foreground: oklch(0.986 0.002 84.556);
  --muted: oklch(0.164 0.009 84.556);
  --muted-foreground: oklch(0.801 0.005 84.568);
  --popover: oklch(0.141 0.015 89.654);
  --popover-foreground: oklch(0.986 0.002 84.556);
  --card: oklch(0.141 0.015 89.654);
  --card-foreground: oklch(0.986 0.002 84.556);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.728 0.055 84.425);
  --primary-foreground: oklch(0.095 0.006 87.723);
  --secondary: oklch(0.337 0.025 84.448);
  --secondary-foreground: oklch(0.857 0.02 84.592);
  --accent: oklch(0.337 0.025 84.448);
  --accent-foreground: oklch(0.857 0.02 84.592);
  --destructive: oklch(0.657 0.212 38.279);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.728 0.055 84.425);
  --chart-1: oklch(0.728 0.055 84.425);
  --chart-2: oklch(0.337 0.025 84.448);
  --chart-3: oklch(0.337 0.025 84.448);
  --chart-4: oklch(0.369 0.028 84.434);
  --chart-5: oklch(0.732 0.061 84.364);
}