Dismal for shadcn/ui

Dismal is a shadcn/ui theme built around a near-black primary color (#0a0509) with near-black accents (#0a0507). The light mode uses a neutral background (#fefbfd). Dark mode keeps the near-black primary (#0a0509) on a purple-tinted background (#10040f).

Color palette

TokenLightDark
Background
#fefbfdsnow
#10040fblack
Foreground
#150413black
#fdfcfdwhite
Card
#fcf8fcsnow
#140512black
Card foreground
#11030fblack
#ffffffwhite
Popover
#fcf8fcsnow
#140512black
Popover foreground
#11030fblack
#ffffffwhite
Primary
#0a0509black
#0a0509black
Primary foreground
#bd84b5rosybrown
#bd84b5rosybrown
Secondary
#08050ablack
#08050ablack
Secondary foreground
#a884bdmediumpurple
#a884bdmediumpurple
Muted
#f3f0f4whitesmoke
#0d0b0fblack
Muted foreground
#695b71dimgray
#9c8ea4darkgray
Accent
#0a0507black
#0a0507black
Accent foreground
#bd8499rosybrown
#bd8499rosybrown
Destructive
#a5420dsaddlebrown
#ef7c3ecoral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0a0509black
#0a0509black

Contrast

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

Light mode
Text on background19.32:1AAA
Text on card19.09:1AAA
Primary button6.85:1AA
Secondary button6.45:1AA
Muted text5.58:1AA
Accent6.66:1AA
Destructive6.17:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.77:1AAA
Primary button6.85:1AA
Secondary button6.45:1AA
Muted text6.36:1AA
Accent6.66:1AA
Destructive7.62:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 329.727);
  --foreground: oklch(0.15 0.044 332.481);
  --muted: oklch(0.959 0.005 313.572);
  --muted-foreground: oklch(0.492 0.039 313.117);
  --popover: oklch(0.983 0.007 329.771);
  --popover-foreground: oklch(0.136 0.038 332.061);
  --card: oklch(0.983 0.007 329.771);
  --card-foreground: oklch(0.136 0.038 332.061);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.128 0.014 330.294);
  --primary-foreground: oklch(0.687 0.096 331.284);
  --secondary: oklch(0.126 0.014 314.556);
  --secondary-foreground: oklch(0.669 0.091 312.757);
  --accent: oklch(0.127 0.011 352.39);
  --accent-foreground: oklch(0.677 0.074 355.559);
  --destructive: oklch(0.508 0.143 43.208);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.128 0.014 330.294);
  --chart-1: oklch(0.128 0.014 330.294);
  --chart-2: oklch(0.126 0.014 314.556);
  --chart-3: oklch(0.127 0.011 352.39);
  --chart-4: oklch(0.161 0.021 312.788);
  --chart-5: oklch(0.127 0.016 330.356);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.033 331.762);
  --foreground: oklch(0.992 0.001 329.701);
  --muted: oklch(0.154 0.008 313.273);
  --muted-foreground: oklch(0.666 0.036 313.27);
  --popover: oklch(0.151 0.038 332.166);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.151 0.038 332.166);
  --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.128 0.014 330.294);
  --primary-foreground: oklch(0.687 0.096 331.284);
  --secondary: oklch(0.126 0.014 314.556);
  --secondary-foreground: oklch(0.669 0.091 312.757);
  --accent: oklch(0.127 0.011 352.39);
  --accent-foreground: oklch(0.677 0.074 355.559);
  --destructive: oklch(0.707 0.161 46.542);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.128 0.014 330.294);
  --chart-1: oklch(0.128 0.014 330.294);
  --chart-2: oklch(0.126 0.014 314.556);
  --chart-3: oklch(0.127 0.011 352.39);
  --chart-4: oklch(0.161 0.021 312.788);
  --chart-5: oklch(0.127 0.016 330.356);
}