Dismal for shadcn/ui

Dismal is a shadcn/ui theme built around a deep green primary color (#0d541c) with deep purple accents (#540d45). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the deep green primary (#0d541c) on a neutral background (#030704).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#030704black
Foreground
#020804black
#fbfdfcwhite
Card
#f8fcf9mintcream
#050b06black
Card foreground
#010402black
#ffffffwhite
Popover
#f8fcf9mintcream
#050b06black
Popover foreground
#010402black
#ffffffwhite
Primary
#0d541cdarkgreen
#0d541cdarkgreen
Primary foreground
#a2f1b3palegreen
#a2f1b3palegreen
Secondary
#540d45indigo
#540d45indigo
Secondary foreground
#f1a2e0plum
#f1a2e0plum
Muted
#ebe6e9lavender
#191418black
Muted foreground
#614c5ddimgray
#b39eaedarkgray
Accent
#540d45indigo
#540d45indigo
Accent foreground
#f1a2e0plum
#f1a2e0plum
Destructive
#9b3b03saddlebrown
#fb7223tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0d541cdarkgreen
#0d541cdarkgreen

Contrast

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

Light mode
Text on background19.83:1AAA
Text on card19.84:1AAA
Primary button6.82:1AA
Secondary button7.22:1AAA
Muted text6.28:1AA
Accent7.22:1AAA
Destructive6.96:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.89:1AAA
Primary button6.82:1AA
Secondary button7.22:1AAA
Muted text7.26:1AAA
Accent7.22:1AAA
Destructive7.51:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 152.579);
  --foreground: oklch(0.123 0.02 151.836);
  --muted: oklch(0.929 0.008 332.743);
  --muted-foreground: oklch(0.445 0.038 333.866);
  --popover: oklch(0.986 0.005 152.541);
  --popover-foreground: oklch(0.097 0.016 151.836);
  --card: oklch(0.986 0.005 152.541);
  --card-foreground: oklch(0.097 0.016 151.836);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.392 0.111 146.174);
  --primary-foreground: oklch(0.891 0.116 150.343);
  --secondary: oklch(0.312 0.12 338.698);
  --secondary-foreground: oklch(0.808 0.122 334.8);
  --accent: oklch(0.312 0.12 338.698);
  --accent-foreground: oklch(0.808 0.122 334.8);
  --destructive: oklch(0.48 0.14 42.975);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.392 0.111 146.174);
  --chart-1: oklch(0.392 0.111 146.174);
  --chart-2: oklch(0.312 0.12 338.698);
  --chart-3: oklch(0.312 0.12 338.698);
  --chart-4: oklch(0.344 0.135 338.86);
  --chart-5: oklch(0.396 0.114 145.974);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.015 152.031);
  --foreground: oklch(0.993 0.003 152.572);
  --muted: oklch(0.201 0.011 333.448);
  --muted-foreground: oklch(0.722 0.033 333.313);
  --popover: oklch(0.138 0.017 152.01);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.138 0.017 152.01);
  --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.392 0.111 146.174);
  --primary-foreground: oklch(0.891 0.116 150.343);
  --secondary: oklch(0.312 0.12 338.698);
  --secondary-foreground: oklch(0.808 0.122 334.8);
  --accent: oklch(0.312 0.12 338.698);
  --accent-foreground: oklch(0.808 0.122 334.8);
  --destructive: oklch(0.706 0.187 45.488);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.392 0.111 146.174);
  --chart-1: oklch(0.392 0.111 146.174);
  --chart-2: oklch(0.312 0.12 338.698);
  --chart-3: oklch(0.312 0.12 338.698);
  --chart-4: oklch(0.344 0.135 338.86);
  --chart-5: oklch(0.396 0.114 145.974);
}