Depression for shadcn/ui

Depression is a shadcn/ui theme built around a green primary color (#5bae75) with purple accents (#ae5b94). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#5bae75) on a green-tinted background (#051008).

Color palette

TokenLightDark
Background
#ffffffwhite
#051008black
Foreground
#000000black
#ffffffwhite
Card
#fcfcfcsnow
#06130ablack
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#051008black
Popover foreground
#000000black
#ffffffwhite
Primary
#5bae75mediumseagreen
#5bae75mediumseagreen
Primary foreground
#000000black
#000000black
Secondary
#ae5b94palevioletred
#ae5b94palevioletred
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e8d9e3gainsboro
#261721black
Muted foreground
#554e53darkslategray
#b1aaafdarkgray
Accent
#ae5b94palevioletred
#ae5b94palevioletred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#e20f03red
#fb1a0ered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5bae75mediumseagreen
#5bae75mediumseagreen

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.77:1AAA
Secondary button4.44:1AA Large
Muted text5.94:1AA
Accent4.44:1AA Large
Destructive4.88:1AA
Dark mode
Text on background19.42:1AAA
Text on card18.95:1AAA
Primary button7.77:1AAA
Secondary button4.44:1AA Large
Muted text7.51:1AAA
Accent4.44:1AA Large
Destructive3.98: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 0 0);
  --muted: oklch(0.9 0.021 337.006);
  --muted-foreground: oklch(0.433 0.011 337.054);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --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.684 0.118 152.428);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.588 0.129 340.519);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.588 0.129 340.519);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.577 0.232 29.593);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.684 0.118 152.428);
  --chart-1: oklch(0.684 0.118 152.428);
  --chart-2: oklch(0.588 0.129 340.519);
  --chart-3: oklch(0.588 0.129 340.519);
  --chart-4: oklch(0.613 0.121 340.105);
  --chart-5: oklch(0.691 0.126 152.076);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.023 155.056);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.229 0.029 338.901);
  --muted-foreground: oklch(0.745 0.01 336.812);
  --popover: oklch(0.157 0.023 155.056);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.172 0.027 153.79);
  --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.684 0.118 152.428);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.588 0.129 340.519);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.588 0.129 340.519);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.627 0.249 29.483);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.684 0.118 152.428);
  --chart-1: oklch(0.684 0.118 152.428);
  --chart-2: oklch(0.588 0.129 340.519);
  --chart-3: oklch(0.588 0.129 340.519);
  --chart-4: oklch(0.613 0.121 340.105);
  --chart-5: oklch(0.691 0.126 152.076);
}