Spiteful for shadcn/ui

Spiteful is a shadcn/ui theme built around a cyan primary color (#2a99bb) with blue accents (#2a51bb). The light mode uses a neutral background (#f7fcfd). Dark mode keeps the cyan primary (#2a99bb) on a neutral background (#020303).

Color palette

TokenLightDark
Background
#f7fcfdghostwhite
#020303black
Foreground
#000000black
#f6f8f9whitesmoke
Card
#f2fafcaliceblue
#030607black
Card foreground
#000000black
#f9fafbghostwhite
Popover
#f2fafcaliceblue
#030607black
Popover foreground
#000000black
#f9fafbghostwhite
Primary
#2a99bblightseagreen
#2a99bblightseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#2abb94lightseagreen
#2abb94lightseagreen
Secondary foreground
#051510black
#051510black
Muted
#dbf0ealavender
#0f241eblack
Muted foreground
#3f4a47darkslategray
#b5c0bdsilver
Accent
#2a51bbroyalblue
#2a51bbroyalblue
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#6f1f0bmaroon
#ea502achocolate
Destructive foreground
#f8c2b5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2a99bblightseagreen
#2a99bblightseagreen

Contrast

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

Light mode
Text on background20.24:1AAA
Text on card19.86:1AAA
Primary button3.28:1AA Large
Secondary button7.70:1AAA
Muted text7.73:1AAA
Accent7.01:1AAA
Destructive7.10:1AAA
Dark mode
Text on background19.39:1AAA
Text on card19.44:1AAA
Primary button3.28:1AA Large
Secondary button7.70:1AAA
Muted text8.72:1AAA
Accent7.01:1AAA
Destructive3.70: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.987 0.006 217.776);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.938 0.023 178.072);
  --muted-foreground: oklch(0.4 0.015 177.66);
  --popover: oklch(0.98 0.009 217.794);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.009 217.794);
  --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.638 0.107 223.214);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.709 0.131 169.862);
  --secondary-foreground: oklch(0.178 0.025 174.74);
  --accent: oklch(0.473 0.173 265.139);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.367 0.117 34.662);
  --destructive-foreground: oklch(0.859 0.065 34.414);
  --ring: oklch(0.638 0.107 223.214);
  --chart-1: oklch(0.638 0.107 223.214);
  --chart-2: oklch(0.709 0.131 169.862);
  --chart-3: oklch(0.473 0.173 265.139);
  --chart-4: oklch(0.744 0.138 169.805);
  --chart-5: oklch(0.644 0.11 223.649);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.094 0.006 214.929);
  --foreground: oklch(0.978 0.002 217.756);
  --muted: oklch(0.24 0.029 174.548);
  --muted-foreground: oklch(0.797 0.013 178.315);
  --popover: oklch(0.118 0.007 214.929);
  --popover-foreground: oklch(0.985 0.002 217.752);
  --card: oklch(0.118 0.007 214.929);
  --card-foreground: oklch(0.985 0.002 217.752);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.638 0.107 223.214);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.709 0.131 169.862);
  --secondary-foreground: oklch(0.178 0.025 174.74);
  --accent: oklch(0.473 0.173 265.139);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.638 0.197 34.85);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.638 0.107 223.214);
  --chart-1: oklch(0.638 0.107 223.214);
  --chart-2: oklch(0.709 0.131 169.862);
  --chart-3: oklch(0.473 0.173 265.139);
  --chart-4: oklch(0.744 0.138 169.805);
  --chart-5: oklch(0.644 0.11 223.649);
}