comfy dark for shadcn/ui

comfy dark is a shadcn/ui theme built around a deep violet primary color (#1a1528) with muted light violet accents (#e6e4ec). The light mode uses a neutral background (#f9f8fb). Dark mode keeps the deep violet primary (#1a1528) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f9f8fbghostwhite
#000000black
Foreground
#020104black
#f7f6f9whitesmoke
Card
#f6f5fawhitesmoke
#030303black
Card foreground
#000000black
#f9f9fbghostwhite
Popover
#f9f8fbghostwhite
#000000black
Popover foreground
#020104black
#f7f6f9whitesmoke
Primary
#1a1528black
#1a1528black
Primary foreground
#ada1cedarkgray
#ada1cedarkgray
Secondary
#e6e4eclavender
#1c1b1dblack
Secondary foreground
#48415ddarkslategray
#b4b4b7silver
Muted
#dddce0gainsboro
#201f23black
Muted foreground
#5e586fdimgray
#9690a7darkgray
Accent
#e6e4eclavender
#1c1b1dblack
Accent foreground
#48415ddarkslategray
#b4b4b7silver
Destructive
#78270dsaddlebrown
#ea6134tomato
Destructive foreground
#f8cdbepeachpuff
#000000black
Border
#e2e1e5gainsboro
#232126black
Input
#e2e1e5gainsboro
#232126black
Ring
#1a1528black
#1a1528black

Contrast

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

Light mode
Text on background19.72:1AAA
Text on card19.36:1AAA
Primary button7.40:1AAA
Secondary button7.61:1AAA
Muted text4.94:1AA
Accent7.61:1AAA
Destructive6.88:1AA
Dark mode
Text on background19.50:1AAA
Text on card19.66:1AAA
Primary button7.40:1AAA
Secondary button8.27:1AAA
Muted text5.34:1AA
Accent8.27:1AAA
Destructive6.26:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 298.491);
  --foreground: oklch(0.076 0.02 298.392);
  --muted: oklch(0.895 0.006 298.441);
  --muted-foreground: oklch(0.474 0.039 297.116);
  --popover: oklch(0.982 0.004 298.491);
  --popover-foreground: oklch(0.076 0.02 298.392);
  --card: oklch(0.972 0.006 298.451);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.912 0.005 298.463);
  --input: oklch(0.912 0.005 298.463);
  --primary: oklch(0.212 0.037 295.313);
  --primary-foreground: oklch(0.736 0.064 297.013);
  --secondary: oklch(0.923 0.011 298.352);
  --secondary-foreground: oklch(0.394 0.048 296.362);
  --accent: oklch(0.923 0.011 298.352);
  --accent-foreground: oklch(0.394 0.048 296.362);
  --destructive: oklch(0.393 0.118 37.424);
  --destructive-foreground: oklch(0.881 0.053 39.262);
  --ring: oklch(0.212 0.037 295.313);
  --chart-1: oklch(0.212 0.037 295.313);
  --chart-2: oklch(0.923 0.011 298.352);
  --chart-3: oklch(0.923 0.011 298.352);
  --chart-4: oklch(0.949 0.007 298.428);
  --chart-5: oklch(0.21 0.041 294.923);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.974 0.004 298.489);
  --muted: oklch(0.242 0.009 297.921);
  --muted-foreground: oklch(0.666 0.036 297.626);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.974 0.004 298.489);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.983 0.003 298.515);
  --border: oklch(0.252 0.009 297.906);
  --input: oklch(0.252 0.009 297.906);
  --primary: oklch(0.212 0.037 295.313);
  --primary-foreground: oklch(0.736 0.064 297.013);
  --secondary: oklch(0.225 0.002 298.397);
  --secondary-foreground: oklch(0.77 0.004 298.47);
  --accent: oklch(0.225 0.002 298.397);
  --accent-foreground: oklch(0.77 0.004 298.47);
  --destructive: oklch(0.66 0.179 38.23);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.212 0.037 295.313);
  --chart-1: oklch(0.212 0.037 295.313);
  --chart-2: oklch(0.225 0.002 298.397);
  --chart-3: oklch(0.225 0.002 298.397);
  --chart-4: oklch(0.257 0.003 298.383);
  --chart-5: oklch(0.21 0.041 294.923);
}