Earmuffs for shadcn/ui

Earmuffs is a shadcn/ui theme built around a near-black primary color (#09020e) with near-black accents (#020e09). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the near-black primary (#09020e) on a violet-tinted background (#08050a).

Color palette

TokenLightDark
Background
#fdfbfewhite
#08050ablack
Foreground
#000000black
#fdfcfdwhite
Card
#fdfbfewhite
#08050ablack
Card foreground
#000000black
#fdfcfdwhite
Popover
#fdfbfewhite
#08050ablack
Popover foreground
#000000black
#fdfcfdwhite
Primary
#09020eblack
#09020eblack
Primary foreground
#dab2f5plum
#dab2f5plum
Secondary
#0e0902black
#0e0902black
Secondary foreground
#e9af58sandybrown
#e9af58sandybrown
Muted
#f5f3efwhitesmoke
#100d0ablack
Muted foreground
#5f5649darkolivegreen
#b6ada0darkgray
Accent
#020e09black
#020e09black
Accent foreground
#19c27fmediumseagreen
#19c27fmediumseagreen
Destructive
#75180amaroon
#dd2e13orangered
Destructive foreground
#f9c1b9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#09020eblack
#09020eblack

Contrast

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

Light mode
Text on background20.38:1AAA
Text on card20.38:1AAA
Primary button11.38:1AAA
Secondary button10.15:1AAA
Muted text6.49:1AA
Accent8.49:1AAA
Destructive7.03:1AAA
Dark mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button11.38:1AAA
Secondary button10.15:1AAA
Muted text8.73:1AAA
Accent8.49:1AAA
Destructive4.70:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 312.325);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.964 0.005 78.295);
  --muted-foreground: oklch(0.459 0.024 78.026);
  --popover: oklch(0.99 0.004 312.325);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.004 312.325);
  --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.113 0.038 314.386);
  --primary-foreground: oklch(0.822 0.101 311.438);
  --secondary: oklch(0.142 0.022 86.172);
  --secondary-foreground: oklch(0.792 0.124 75.313);
  --accent: oklch(0.146 0.024 169.93);
  --accent-foreground: oklch(0.72 0.161 158.946);
  --destructive: oklch(0.371 0.129 31.643);
  --destructive-foreground: oklch(0.859 0.065 28.516);
  --ring: oklch(0.113 0.038 314.386);
  --chart-1: oklch(0.113 0.038 314.386);
  --chart-2: oklch(0.142 0.022 86.172);
  --chart-3: oklch(0.146 0.024 169.93);
  --chart-4: oklch(0.189 0.031 78.24);
  --chart-5: oklch(0.112 0.039 314.457);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.014 313.311);
  --foreground: oklch(0.992 0.001 312.349);
  --muted: oklch(0.162 0.008 78.024);
  --muted-foreground: oklch(0.751 0.021 78.195);
  --popover: oklch(0.125 0.014 313.311);
  --popover-foreground: oklch(0.992 0.001 312.349);
  --card: oklch(0.125 0.014 313.311);
  --card-foreground: oklch(0.992 0.001 312.349);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.113 0.038 314.386);
  --primary-foreground: oklch(0.822 0.101 311.438);
  --secondary: oklch(0.142 0.022 86.172);
  --secondary-foreground: oklch(0.792 0.124 75.313);
  --accent: oklch(0.146 0.024 169.93);
  --accent-foreground: oklch(0.72 0.161 158.946);
  --destructive: oklch(0.582 0.213 31.497);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.113 0.038 314.386);
  --chart-1: oklch(0.113 0.038 314.386);
  --chart-2: oklch(0.142 0.022 86.172);
  --chart-3: oklch(0.146 0.024 169.93);
  --chart-4: oklch(0.189 0.031 78.24);
  --chart-5: oklch(0.112 0.039 314.457);
}