Sorrowful for shadcn/ui

Sorrowful is a shadcn/ui theme built around a muted deep blue primary color (#262a31) with muted deep yellow accents (#312d26). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the muted deep blue primary (#262a31) on a blue-tinted background (#04060b).

Color palette

TokenLightDark
Background
#fbfcfewhite
#04060bblack
Foreground
#020408black
#f5f7f9whitesmoke
Card
#f6f9fdghostwhite
#05090fblack
Card foreground
#010204black
#f9f9fbghostwhite
Popover
#f6f9fdghostwhite
#05090fblack
Popover foreground
#010204black
#f9f9fbghostwhite
Primary
#262a31darkslategray
#262a31darkslategray
Primary foreground
#bdc2cbsilver
#bdc2cbsilver
Secondary
#312d26darkslategray
#312d26darkslategray
Secondary foreground
#cbc7bdsilver
#cbc7bdsilver
Muted
#ebe6dbantiquewhite
#241f14black
Muted foreground
#4d483ddarkslategray
#c2bdb2silver
Accent
#312d26darkslategray
#312d26darkslategray
Accent foreground
#cbc7bdsilver
#cbc7bdsilver
Destructive
#952d04saddlebrown
#f94b06orangered
Destructive foreground
#fedbcdbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#262a31darkslategray
#262a31darkslategray

Contrast

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

Light mode
Text on background19.96:1AAA
Text on card19.64:1AAA
Primary button8.08:1AAA
Secondary button8.11:1AAA
Muted text7.28:1AAA
Accent8.11:1AAA
Destructive6.10:1AA
Dark mode
Text on background18.84:1AAA
Text on card19.00:1AAA
Primary button8.08:1AAA
Secondary button8.11:1AAA
Muted text8.77:1AAA
Accent8.11:1AAA
Destructive3.48: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.99 0.003 264.541);
  --foreground: oklch(0.107 0.014 256.404);
  --muted: oklch(0.925 0.015 84.585);
  --muted-foreground: oklch(0.402 0.019 84.567);
  --popover: oklch(0.981 0.007 264.53);
  --popover-foreground: oklch(0.085 0.011 256.404);
  --card: oklch(0.981 0.007 264.53);
  --card-foreground: oklch(0.085 0.011 256.404);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.283 0.014 264.328);
  --primary-foreground: oklch(0.813 0.014 264.489);
  --secondary: oklch(0.299 0.013 84.577);
  --secondary-foreground: oklch(0.83 0.014 84.586);
  --accent: oklch(0.299 0.013 84.577);
  --accent-foreground: oklch(0.83 0.014 84.586);
  --destructive: oklch(0.452 0.146 37.715);
  --destructive-foreground: oklch(0.917 0.043 42.779);
  --ring: oklch(0.283 0.014 264.328);
  --chart-1: oklch(0.283 0.014 264.328);
  --chart-2: oklch(0.299 0.013 84.577);
  --chart-3: oklch(0.299 0.013 84.577);
  --chart-4: oklch(0.331 0.015 84.574);
  --chart-5: oklch(0.281 0.017 264.248);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.014 257.923);
  --foreground: oklch(0.975 0.004 264.539);
  --muted: oklch(0.24 0.02 84.345);
  --muted-foreground: oklch(0.799 0.016 84.59);
  --popover: oklch(0.136 0.017 259.695);
  --popover-foreground: oklch(0.983 0.003 264.543);
  --card: oklch(0.136 0.017 259.695);
  --card-foreground: oklch(0.983 0.003 264.543);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.283 0.014 264.328);
  --primary-foreground: oklch(0.813 0.014 264.489);
  --secondary: oklch(0.299 0.013 84.577);
  --secondary-foreground: oklch(0.83 0.014 84.586);
  --accent: oklch(0.299 0.013 84.577);
  --accent-foreground: oklch(0.83 0.014 84.586);
  --destructive: oklch(0.655 0.219 36.659);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.283 0.014 264.328);
  --chart-1: oklch(0.283 0.014 264.328);
  --chart-2: oklch(0.299 0.013 84.577);
  --chart-3: oklch(0.299 0.013 84.577);
  --chart-4: oklch(0.331 0.015 84.574);
  --chart-5: oklch(0.281 0.017 264.248);
}