Depression for shadcn/ui

Depression is a shadcn/ui theme built around a red primary color (#d1a9a9) with neutral gray accents (#d2d1d1). The light mode uses a neutral background (#ffffff). Dark mode keeps the red primary (#d1a9a9) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040101black
#fbf9f9snow
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#fdfcfcsnow
Popover
#ffffffwhite
#000000black
Popover foreground
#040101black
#fbf9f9snow
Primary
#d1a9a9tan
#d1a9a9tan
Primary foreground
#2e1919black
#2e1919black
Secondary
#d2d1d1lightgrey
#291f1fblack
Secondary foreground
#393838darkslategray
#c6b3b3silver
Muted
#f3ececlinen
#130c0cblack
Muted foreground
#5e4545darkolivegreen
#baa1a1darkgray
Accent
#d2d1d1lightgrey
#291f1fblack
Accent foreground
#393838darkslategray
#c6b3b3silver
Destructive
#ad2705firebrick
#f85025orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d1a9a9tan
#d1a9a9tan

Contrast

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

Light mode
Text on background20.79:1AAA
Text on card20.54:1AAA
Primary button7.82:1AAA
Secondary button7.64:1AAA
Muted text7.47:1AAA
Accent7.64:1AAA
Destructive6.83:1AA
Dark mode
Text on background20.02:1AAA
Text on card20.19:1AAA
Primary button7.82:1AAA
Secondary button8.04:1AAA
Muted text8.02:1AAA
Accent8.04:1AAA
Destructive3.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.082 0.015 20.789);
  --muted: oklch(0.949 0.008 17.296);
  --muted-foreground: oklch(0.418 0.034 18.601);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.082 0.015 20.789);
  --card: oklch(0.992 0 161.565);
  --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.77 0.047 18.218);
  --primary-foreground: oklch(0.243 0.035 19.884);
  --secondary: oklch(0.86 0.001 17.178);
  --secondary-foreground: oklch(0.34 0.002 17.234);
  --accent: oklch(0.86 0.001 17.178);
  --accent-foreground: oklch(0.34 0.002 17.234);
  --destructive: oklch(0.49 0.175 33.512);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.77 0.047 18.218);
  --chart-1: oklch(0.77 0.047 18.218);
  --chart-2: oklch(0.86 0.001 17.178);
  --chart-3: oklch(0.86 0.001 17.178);
  --chart-4: oklch(0.884 0.001 17.174);
  --chart-5: oklch(0.768 0.052 18.34);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.001 17.18);
  --muted: oklch(0.163 0.013 18.564);
  --muted-foreground: oklch(0.731 0.029 17.831);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.001 17.18);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 17.169);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.77 0.047 18.218);
  --primary-foreground: oklch(0.243 0.035 19.884);
  --secondary: oklch(0.25 0.016 18.248);
  --secondary-foreground: oklch(0.784 0.021 17.616);
  --accent: oklch(0.25 0.016 18.248);
  --accent-foreground: oklch(0.784 0.021 17.616);
  --destructive: oklch(0.661 0.212 34.628);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.77 0.047 18.218);
  --chart-1: oklch(0.77 0.047 18.218);
  --chart-2: oklch(0.25 0.016 18.248);
  --chart-3: oklch(0.25 0.016 18.248);
  --chart-4: oklch(0.28 0.018 18.313);
  --chart-5: oklch(0.768 0.052 18.34);
}