Haunt for shadcn/ui

Haunt is a shadcn/ui theme built around a muted violet primary color (#6a5284) with muted purple accents (#835284). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted violet primary (#6a5284) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#ffffffwhite
#050307black
Foreground
#07020dblack
#fcfcfdwhite
Card
#ffffffwhite
#050307black
Card foreground
#07020dblack
#fcfcfdwhite
Popover
#ffffffwhite
#050307black
Popover foreground
#07020dblack
#fcfcfdwhite
Primary
#6a5284dimgray
#6a5284dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#525384darkslateblue
#525384darkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e3e3f3lavender
#0c0d1cblack
Muted foreground
#494950darkslategray
#afafb6darkgray
Accent
#835284dimgray
#835284dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#9a1f04darkred
#ef3106orangered
Destructive foreground
#fedad2bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6a5284dimgray
#6a5284dimgray

Contrast

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

Light mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button6.62:1AA
Secondary button7.14:1AAA
Muted text7.02:1AAA
Accent5.97:1AA
Destructive6.26:1AA
Dark mode
Text on background20.00:1AAA
Text on card20.00:1AAA
Primary button6.62:1AA
Secondary button7.14:1AAA
Muted text8.83:1AAA
Accent5.97:1AA
Destructive4.12:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.111 0.035 309.354);
  --muted: oklch(0.92 0.021 285.199);
  --muted-foreground: oklch(0.407 0.012 285.057);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.111 0.035 309.354);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.111 0.035 309.354);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.485 0.082 305.763);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.464 0.078 282.173);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.513 0.095 326.277);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.448 0.162 33.031);
  --destructive-foreground: oklch(0.917 0.041 32.741);
  --ring: oklch(0.485 0.082 305.763);
  --chart-1: oklch(0.485 0.082 305.763);
  --chart-2: oklch(0.464 0.078 282.173);
  --chart-3: oklch(0.513 0.095 326.277);
  --chart-4: oklch(0.487 0.083 282.138);
  --chart-5: oklch(0.48 0.092 305.453);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.013 308.656);
  --foreground: oklch(0.991 0.003 307.758);
  --muted: oklch(0.167 0.032 281.542);
  --muted-foreground: oklch(0.756 0.011 285.362);
  --popover: oklch(0.107 0.013 308.656);
  --popover-foreground: oklch(0.991 0.003 307.758);
  --card: oklch(0.107 0.013 308.656);
  --card-foreground: oklch(0.991 0.003 307.758);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.485 0.082 305.763);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.464 0.078 282.173);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.513 0.095 326.277);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.616 0.228 32.461);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.485 0.082 305.763);
  --chart-1: oklch(0.485 0.082 305.763);
  --chart-2: oklch(0.464 0.078 282.173);
  --chart-3: oklch(0.513 0.095 326.277);
  --chart-4: oklch(0.487 0.083 282.138);
  --chart-5: oklch(0.48 0.092 305.453);
}