Dismal for shadcn/ui

Dismal is a shadcn/ui theme built around a vivid deep green primary color (#0d871f) with vivid deep purple accents (#870d75). The light mode uses a neutral background (#f8fcf8). Dark mode keeps the vivid deep green primary (#0d871f) on a green-tinted background (#050a06).

Color palette

TokenLightDark
Background
#f8fcf8mintcream
#050a06black
Foreground
#000000black
#fcfdfcwhite
Card
#f4fbf5whitesmoke
#070e08black
Card foreground
#000000black
#ffffffwhite
Popover
#f8fcf8mintcream
#050a06black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#0d871fforestgreen
#0d871fforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#870d75purple
#870d75purple
Secondary foreground
#faccf3mistyrose
#faccf3mistyrose
Muted
#e4cde1gainsboro
#321b2edarkslategray
Muted foreground
#6a5c68dimgray
#a395a0darkgray
Accent
#870d75purple
#870d75purple
Accent foreground
#faccf3mistyrose
#faccf3mistyrose
Destructive
#991b0bdarkred
#f04028orangered
Destructive foreground
#fcddd9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0d871fforestgreen
#0d871fforestgreen

Contrast

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

Light mode
Text on background20.27:1AAA
Text on card19.91:1AAA
Primary button4.64:1AA
Secondary button6.38:1AA
Muted text4.23:1AA Large
Accent6.38:1AA
Destructive6.56:1AA
Dark mode
Text on background19.55:1AAA
Text on card19.57:1AAA
Primary button4.64:1AA
Secondary button6.38:1AA
Muted text5.54:1AA
Accent6.38:1AA
Destructive3.84:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.007 150.16);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.874 0.036 330.773);
  --muted-foreground: oklch(0.494 0.025 330.895);
  --popover: oklch(0.987 0.007 150.16);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.01 150.115);
  --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.544 0.171 144.108);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.431 0.183 336.004);
  --secondary-foreground: oklch(0.896 0.073 331.259);
  --accent: oklch(0.431 0.183 336.004);
  --accent-foreground: oklch(0.896 0.073 331.259);
  --destructive: oklch(0.442 0.163 31.002);
  --destructive-foreground: oklch(0.922 0.035 26.741);
  --ring: oklch(0.544 0.171 144.108);
  --chart-1: oklch(0.544 0.171 144.108);
  --chart-2: oklch(0.431 0.183 336.004);
  --chart-3: oklch(0.431 0.183 336.004);
  --chart-4: oklch(0.463 0.197 336.068);
  --chart-5: oklch(0.55 0.175 143.973);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.015 149.619);
  --foreground: oklch(0.993 0.001 150.227);
  --muted: oklch(0.26 0.048 332.463);
  --muted-foreground: oklch(0.684 0.023 330.682);
  --popover: oklch(0.137 0.015 149.619);
  --popover-foreground: oklch(0.993 0.001 150.227);
  --card: oklch(0.152 0.017 149.313);
  --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.544 0.171 144.108);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.431 0.183 336.004);
  --secondary-foreground: oklch(0.896 0.073 331.259);
  --accent: oklch(0.431 0.183 336.004);
  --accent-foreground: oklch(0.896 0.073 331.259);
  --destructive: oklch(0.632 0.216 30.993);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.544 0.171 144.108);
  --chart-1: oklch(0.544 0.171 144.108);
  --chart-2: oklch(0.431 0.183 336.004);
  --chart-3: oklch(0.431 0.183 336.004);
  --chart-4: oklch(0.463 0.197 336.068);
  --chart-5: oklch(0.55 0.175 143.973);
}