Spiteful for shadcn/ui

Spiteful is a shadcn/ui theme built around a neutral gray primary color (#b2aeb2) with neutral gray accents (#aeb2b2). The light mode uses a neutral background (#fefbfe). Dark mode keeps the neutral gray primary (#b2aeb2) on a purple-tinted background (#0d070d).

Color palette

TokenLightDark
Background
#fefbfewhite
#0d070dblack
Foreground
#080208black
#fdfcfdwhite
Card
#fdf7fdsnow
#110911black
Card foreground
#040104black
#ffffffwhite
Popover
#fefbfewhite
#0d070dblack
Popover foreground
#080208black
#fdfcfdwhite
Primary
#b2aeb2darkgray
#b2aeb2darkgray
Primary foreground
#181618black
#181618black
Secondary
#b2b2aedarkgray
#b2b2aedarkgray
Secondary foreground
#181816black
#181816black
Muted
#f1f1efwhitesmoke
#10100eblack
Muted foreground
#696963dimgray
#9c9c96darkgray
Accent
#aeb2b2darkgray
#aeb2b2darkgray
Accent foreground
#161818black
#161818black
Destructive
#a11408darkred
#f54332tomato
Destructive foreground
#fde0ddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b2aeb2darkgray
#b2aeb2darkgray

Contrast

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

Light mode
Text on background19.99:1AAA
Text on card19.68:1AAA
Primary button8.20:1AAA
Secondary button8.38:1AAA
Muted text4.86:1AA
Accent8.34:1AAA
Destructive6.45:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.64:1AAA
Primary button8.20:1AAA
Secondary button8.38:1AAA
Muted text6.89:1AA
Accent8.34:1AAA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 325.611);
  --foreground: oklch(0.108 0.027 327.221);
  --muted: oklch(0.956 0.002 106.446);
  --muted-foreground: oklch(0.519 0.009 106.723);
  --popover: oklch(0.991 0.005 325.611);
  --popover-foreground: oklch(0.108 0.027 327.221);
  --card: oklch(0.982 0.009 325.646);
  --card-foreground: oklch(0.086 0.021 327.221);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.755 0.009 325.661);
  --primary-foreground: oklch(0.204 0.003 325.703);
  --secondary: oklch(0.763 0.007 106.556);
  --secondary-foreground: oklch(0.207 0.003 106.631);
  --accent: oklch(0.761 0.005 197.044);
  --accent-foreground: oklch(0.206 0.002 196.99);
  --destructive: oklch(0.453 0.174 30.117);
  --destructive-foreground: oklch(0.929 0.033 23.963);
  --ring: oklch(0.755 0.009 325.661);
  --chart-1: oklch(0.755 0.009 325.661);
  --chart-2: oklch(0.763 0.007 106.556);
  --chart-3: oklch(0.761 0.005 197.044);
  --chart-4: oklch(0.787 0.006 106.536);
  --chart-5: oklch(0.753 0.017 325.746);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.019 326.505);
  --foreground: oklch(0.992 0.001 325.585);
  --muted: oklch(0.173 0.004 106.781);
  --muted-foreground: oklch(0.691 0.009 106.627);
  --popover: oklch(0.141 0.019 326.505);
  --popover-foreground: oklch(0.992 0.001 325.585);
  --card: oklch(0.154 0.022 326.571);
  --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.755 0.009 325.661);
  --primary-foreground: oklch(0.204 0.003 325.703);
  --secondary: oklch(0.763 0.007 106.556);
  --secondary-foreground: oklch(0.207 0.003 106.631);
  --accent: oklch(0.761 0.005 197.044);
  --accent-foreground: oklch(0.206 0.002 196.99);
  --destructive: oklch(0.644 0.217 29.52);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.755 0.009 325.661);
  --chart-1: oklch(0.755 0.009 325.661);
  --chart-2: oklch(0.763 0.007 106.556);
  --chart-3: oklch(0.761 0.005 197.044);
  --chart-4: oklch(0.787 0.006 106.536);
  --chart-5: oklch(0.753 0.017 325.746);
}