Stress for shadcn/ui

Stress is a shadcn/ui theme built around a vivid deep blue primary color (#030b17) with vivid deep green accents (#0b1703). The light mode uses a neutral background (#f6f9fd). Dark mode keeps the vivid deep blue primary (#030b17) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#f6f9fdghostwhite
#020203black
Foreground
#050c14black
#fcfcfdwhite
Card
#f2f7fcaliceblue
#040507black
Card foreground
#040910black
#ffffffwhite
Popover
#f6f9fdghostwhite
#020203black
Popover foreground
#050c14black
#fcfcfdwhite
Primary
#030b17black
#030b17black
Primary foreground
#619deacornflowerblue
#619deacornflowerblue
Secondary
#17030bblack
#17030bblack
Secondary foreground
#ea619dpalevioletred
#ea619dpalevioletred
Muted
#e8d4dcgainsboro
#2b1720black
Muted foreground
#58464edarkslategray
#b9a7afdarkgray
Accent
#0b1703black
#0b1703black
Accent foreground
#67cb1ayellowgreen
#67cb1ayellowgreen
Destructive
#692b07saddlebrown
#f17127chocolate
Destructive foreground
#f9c6a9navajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#030b17black
#030b17black

Contrast

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

Light mode
Text on background18.67:1AAA
Text on card18.50:1AAA
Primary button7.05:1AAA
Secondary button6.35:1AA
Muted text6.18:1AA
Accent8.92:1AAA
Destructive7.00:1AAA
Dark mode
Text on background20.19:1AAA
Text on card20.41:1AAA
Primary button7.05:1AAA
Secondary button6.35:1AA
Muted text7.38:1AAA
Accent8.92:1AAA
Destructive7.15:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.006 254.987);
  --foreground: oklch(0.151 0.021 252.806);
  --muted: oklch(0.888 0.026 349.517);
  --muted-foreground: oklch(0.416 0.026 350.417);
  --popover: oklch(0.982 0.006 254.987);
  --popover-foreground: oklch(0.151 0.021 252.806);
  --card: oklch(0.973 0.009 255.004);
  --card-foreground: oklch(0.139 0.018 249.958);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.148 0.029 250.535);
  --primary-foreground: oklch(0.688 0.131 255.695);
  --secondary: oklch(0.144 0.043 353.003);
  --secondary-foreground: oklch(0.682 0.18 355.908);
  --accent: oklch(0.186 0.042 132.062);
  --accent-foreground: oklch(0.752 0.217 136.094);
  --destructive: oklch(0.372 0.1 45.251);
  --destructive-foreground: oklch(0.865 0.071 51.536);
  --ring: oklch(0.148 0.029 250.535);
  --chart-1: oklch(0.148 0.029 250.535);
  --chart-2: oklch(0.144 0.043 353.003);
  --chart-3: oklch(0.186 0.042 132.062);
  --chart-4: oklch(0.181 0.057 356.692);
  --chart-5: oklch(0.148 0.03 250.162);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.089 0.006 250.577);
  --foreground: oklch(0.992 0.001 254.957);
  --muted: oklch(0.236 0.036 352.704);
  --muted-foreground: oklch(0.746 0.023 349.557);
  --popover: oklch(0.089 0.006 250.577);
  --popover-foreground: oklch(0.992 0.001 254.957);
  --card: oklch(0.113 0.007 250.577);
  --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.148 0.029 250.535);
  --primary-foreground: oklch(0.688 0.131 255.695);
  --secondary: oklch(0.144 0.043 353.003);
  --secondary-foreground: oklch(0.682 0.18 355.908);
  --accent: oklch(0.186 0.042 132.062);
  --accent-foreground: oklch(0.752 0.217 136.094);
  --destructive: oklch(0.692 0.177 46.113);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.148 0.029 250.535);
  --chart-1: oklch(0.148 0.029 250.535);
  --chart-2: oklch(0.144 0.043 353.003);
  --chart-3: oklch(0.186 0.042 132.062);
  --chart-4: oklch(0.181 0.057 356.692);
  --chart-5: oklch(0.148 0.03 250.162);
}