Haunting for shadcn/ui

Haunting is a shadcn/ui theme built around a muted light violet primary color (#e6e3e8) with neutral gray accents (#e3e2e4). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light violet primary (#e6e3e8) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#ffffffwhite
#050307black
Foreground
#050208black
#fdfbfdsnow
Card
#ffffffwhite
#050307black
Card foreground
#050208black
#fdfbfdsnow
Popover
#ffffffwhite
#050307black
Popover foreground
#050208black
#fdfbfdsnow
Primary
#e6e3e8gainsboro
#e6e3e8gainsboro
Primary foreground
#4d4455darkslategray
#4d4455darkslategray
Secondary
#e3e2e4gainsboro
#171617black
Secondary foreground
#4a484cdarkslategray
#b0aeb2darkgray
Muted
#f3eef6whitesmoke
#0d0911black
Muted foreground
#5a5161dimgray
#a79eaedarkgray
Accent
#e3e2e4gainsboro
#171617black
Accent foreground
#4a484cdarkslategray
#b0aeb2darkgray
Destructive
#ae1613firebrick
#ea413etomato
Destructive foreground
#fef6f6snow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e6e3e8gainsboro
#e6e3e8gainsboro

Contrast

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

Light mode
Text on background20.61:1AAA
Text on card20.61:1AAA
Primary button7.24:1AAA
Secondary button7.00:1AAA
Muted text6.59:1AA
Accent7.00:1AAA
Destructive6.72:1AA
Dark mode
Text on background19.95:1AAA
Text on card19.95:1AAA
Primary button7.24:1AAA
Secondary button8.17:1AAA
Muted text7.66:1AAA
Accent8.17:1AAA
Destructive3.95:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.101 0.026 312.488);
  --muted: oklch(0.955 0.012 310.319);
  --muted-foreground: oklch(0.45 0.028 309.86);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.101 0.026 312.488);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.101 0.026 312.488);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.919 0.008 310.354);
  --primary-foreground: oklch(0.403 0.03 309.742);
  --secondary: oklch(0.914 0.002 310.413);
  --secondary-foreground: oklch(0.405 0.008 310.254);
  --accent: oklch(0.914 0.002 310.413);
  --accent-foreground: oklch(0.405 0.008 310.254);
  --destructive: oklch(0.481 0.185 28.369);
  --destructive-foreground: oklch(0.979 0.009 18.497);
  --ring: oklch(0.919 0.008 310.354);
  --chart-1: oklch(0.919 0.008 310.354);
  --chart-2: oklch(0.914 0.002 310.413);
  --chart-3: oklch(0.914 0.002 310.413);
  --chart-4: oklch(0.938 0.002 310.42);
  --chart-5: oklch(0.918 0.01 310.332);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.019 311.853);
  --foreground: oklch(0.991 0.003 310.41);
  --muted: oklch(0.148 0.019 309.361);
  --muted-foreground: oklch(0.711 0.025 310.111);
  --popover: oklch(0.105 0.019 311.853);
  --popover-foreground: oklch(0.991 0.003 310.41);
  --card: oklch(0.105 0.019 311.853);
  --card-foreground: oklch(0.991 0.003 310.41);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.919 0.008 310.354);
  --primary-foreground: oklch(0.403 0.03 309.742);
  --secondary: oklch(0.203 0.002 310.348);
  --secondary-foreground: oklch(0.754 0.005 310.378);
  --accent: oklch(0.203 0.002 310.348);
  --accent-foreground: oklch(0.754 0.005 310.378);
  --destructive: oklch(0.624 0.206 26.243);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.919 0.008 310.354);
  --chart-1: oklch(0.919 0.008 310.354);
  --chart-2: oklch(0.203 0.002 310.348);
  --chart-3: oklch(0.203 0.002 310.348);
  --chart-4: oklch(0.236 0.003 310.339);
  --chart-5: oklch(0.918 0.01 310.332);
}