Recession for shadcn/ui

Recession is a shadcn/ui theme built around a near-black primary color (#050200) with near-black accents (#050400). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#050200) on an orange-tinted background (#0f0905).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f0905black
Foreground
#140b05black
#fdfcfcsnow
Card
#fcfcfcsnow
#130c07black
Card foreground
#100904black
#ffffffwhite
Popover
#ffffffwhite
#0f0905black
Popover foreground
#140b05black
#fdfcfcsnow
Primary
#050200black
#050200black
Primary foreground
#fa893dcoral
#fa893dcoral
Secondary
#050001black
#050001black
Secondary foreground
#fda1aalightpink
#fda1aalightpink
Muted
#f3f1f1whitesmoke
#0e0c0cblack
Muted foreground
#5b4d4fdimgray
#b2a4a5darkgray
Accent
#050400black
#050400black
Accent foreground
#ccb805goldenrod
#ccb805goldenrod
Destructive
#993406saddlebrown
#e74f08orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#050200black
#050200black

Contrast

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

Light mode
Text on background19.44:1AAA
Text on card19.33:1AAA
Primary button8.57:1AAA
Secondary button10.77:1AAA
Muted text7.13:1AAA
Accent10.16:1AAA
Destructive7.39:1AAA
Dark mode
Text on background19.29:1AAA
Text on card19.43:1AAA
Primary button8.57:1AAA
Secondary button10.77:1AAA
Muted text8.14:1AAA
Accent10.16:1AAA
Destructive3.79:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.161 0.021 58.243);
  --muted: oklch(0.96 0.002 10.136);
  --muted-foreground: oklch(0.436 0.018 11.026);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.161 0.021 58.243);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.148 0.018 61.775);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.093 0.018 72.028);
  --primary-foreground: oklch(0.741 0.163 50.955);
  --secondary: oklch(0.075 0.027 13.825);
  --secondary-foreground: oklch(0.802 0.11 13.331);
  --accent: oklch(0.108 0.022 105.995);
  --accent-foreground: oklch(0.775 0.161 101.532);
  --destructive: oklch(0.467 0.143 39.875);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.093 0.018 72.028);
  --chart-1: oklch(0.093 0.018 72.028);
  --chart-2: oklch(0.075 0.027 13.825);
  --chart-3: oklch(0.108 0.022 105.995);
  --chart-4: oklch(0.124 0.046 15.464);
  --chart-5: oklch(0.093 0.019 72.649);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.147 0.014 60.414);
  --foreground: oklch(0.992 0.001 56.423);
  --muted: oklch(0.155 0.004 10.658);
  --muted-foreground: oklch(0.731 0.016 10.568);
  --popover: oklch(0.147 0.014 60.414);
  --popover-foreground: oklch(0.992 0.001 56.423);
  --card: oklch(0.16 0.017 57.056);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.093 0.018 72.028);
  --primary-foreground: oklch(0.741 0.163 50.955);
  --secondary: oklch(0.075 0.027 13.825);
  --secondary-foreground: oklch(0.802 0.11 13.331);
  --accent: oklch(0.108 0.022 105.995);
  --accent-foreground: oklch(0.775 0.161 101.532);
  --destructive: oklch(0.631 0.199 38.98);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.093 0.018 72.028);
  --chart-1: oklch(0.093 0.018 72.028);
  --chart-2: oklch(0.075 0.027 13.825);
  --chart-3: oklch(0.108 0.022 105.995);
  --chart-4: oklch(0.124 0.046 15.464);
  --chart-5: oklch(0.093 0.019 72.649);
}