Depression for shadcn/ui

Depression is a shadcn/ui theme built around a muted indigo primary color (#7c80b1) with muted yellow accents (#b1ad7c). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted indigo primary (#7c80b1) on a neutral background (#010104).

Color palette

TokenLightDark
Background
#ffffffwhite
#010104black
Foreground
#030411black
#f8f8fcghostwhite
Card
#fcfcfcsnow
#030308black
Card foreground
#02030dblack
#fcfcfdwhite
Popover
#ffffffwhite
#010104black
Popover foreground
#030411black
#f8f8fcghostwhite
Primary
#7c80b1lightslategray
#7c80b1lightslategray
Primary foreground
#000000black
#000000black
Secondary
#b1ad7cdarkkhaki
#b1ad7cdarkkhaki
Secondary foreground
#000000black
#000000black
Muted
#f5f5efwhitesmoke
#100f0ablack
Muted foreground
#5e5e5edimgray
#a1a1a1darkgray
Accent
#b1ad7cdarkkhaki
#b1ad7cdarkkhaki
Accent foreground
#000000black
#000000black
Destructive
#710d0amaroon
#e11a14crimson
Destructive foreground
#f8b6b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7c80b1lightslategray
#7c80b1lightslategray

Contrast

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

Light mode
Text on background20.40:1AAA
Text on card20.11:1AAA
Primary button5.57:1AA
Secondary button9.13:1AAA
Muted text5.92:1AA
Accent9.13:1AAA
Destructive7.01:1AAA
Dark mode
Text on background19.63:1AAA
Text on card20.09:1AAA
Primary button5.57:1AA
Secondary button9.13:1AAA
Muted text7.41:1AAA
Accent9.13:1AAA
Destructive4.80:1AA

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.116 0.034 274.831);
  --muted: oklch(0.969 0.008 103.237);
  --muted-foreground: oklch(0.483 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.116 0.034 274.831);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.105 0.029 274.887);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.615 0.074 280.825);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.739 0.066 104.454);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.739 0.066 104.454);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.352 0.133 28.602);
  --destructive-foreground: oklch(0.838 0.077 21.085);
  --ring: oklch(0.615 0.074 280.825);
  --chart-1: oklch(0.615 0.074 280.825);
  --chart-2: oklch(0.739 0.066 104.454);
  --chart-3: oklch(0.739 0.066 104.454);
  --chart-4: oklch(0.758 0.061 104.339);
  --chart-5: oklch(0.608 0.083 280.479);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.013 278.518);
  --foreground: oklch(0.981 0.005 283.028);
  --muted: oklch(0.169 0.011 104.157);
  --muted-foreground: oklch(0.708 0 158.199);
  --popover: oklch(0.079 0.013 278.518);
  --popover-foreground: oklch(0.981 0.005 283.028);
  --card: oklch(0.1 0.017 278.518);
  --card-foreground: oklch(0.99 0.002 283.068);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.615 0.074 280.825);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.739 0.066 104.454);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.739 0.066 104.454);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.58 0.227 29.045);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.615 0.074 280.825);
  --chart-1: oklch(0.615 0.074 280.825);
  --chart-2: oklch(0.739 0.066 104.454);
  --chart-3: oklch(0.739 0.066 104.454);
  --chart-4: oklch(0.758 0.061 104.339);
  --chart-5: oklch(0.608 0.083 280.479);
}