Spiteful is a shadcn/ui theme built around a vivid violet primary color (#5b1396) with vivid purple accents (#96138f). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid violet primary (#5b1396) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfewhite | #050307black |
| Foreground | #050209black | #f8f5f9whitesmoke |
| Card | #fdfbfewhite | #050307black |
| Card foreground | #050209black | #f8f5f9whitesmoke |
| Popover | #fdfbfewhite | #050307black |
| Popover foreground | #050209black | #f8f5f9whitesmoke |
| Primary | #5b1396indigo | #5b1396indigo |
| Primary foreground | #efdffblavender | #efdffblavender |
| Secondary | #191396darkblue | #191396darkblue |
| Secondary foreground | #e1dffblavender | #e1dffblavender |
| Muted | #e8e8f3lavender | #0d0c17black |
| Muted foreground | #515158darkslategray | #a8a7aedarkgray |
| Accent | #96138fdarkmagenta | #96138fdarkmagenta |
| Accent foreground | #fbdffalavenderblush | #fbdffalavenderblush |
| Destructive | #971802darkred | #fd4626orangered |
| Destructive foreground | #fed4cdbisque | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5b1396indigo | #5b1396indigo |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.02:1 | AAA |
| Text on card | 20.02:1 | AAA |
| Primary button | 8.43:1 | AAA |
| Secondary button | 10.28:1 | AAA |
| Muted text | 6.45:1 | AA |
| Accent | 6.12:1 | AA |
| Destructive | 6.31:1 | AA |
| Text on background | 18.96:1 | AAA |
| Text on card | 18.96:1 | AAA |
| Primary button | 8.43:1 | AAA |
| Secondary button | 10.28:1 | AAA |
| Muted text | 8.12:1 | AAA |
| Accent | 6.12:1 | AA |
| Destructive | 3.45:1 | AA Large |
Paste this into your globals.css to use Spiteful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 310.403);
--foreground: oklch(0.099 0.029 312.733);
--muted: oklch(0.933 0.015 288.411);
--muted-foreground: oklch(0.437 0.011 288.237);
--popover: oklch(0.99 0.004 310.403);
--popover-foreground: oklch(0.099 0.029 312.733);
--card: oklch(0.99 0.004 310.403);
--card-foreground: oklch(0.099 0.029 312.733);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.39 0.19 302.434);
--primary-foreground: oklch(0.925 0.041 310.03);
--secondary: oklch(0.327 0.195 270.048);
--secondary-foreground: oklch(0.914 0.038 287.923);
--accent: oklch(0.474 0.204 330.665);
--accent-foreground: oklch(0.935 0.046 327.484);
--destructive: oklch(0.437 0.164 31.956);
--destructive-foreground: oklch(0.904 0.049 29.758);
--ring: oklch(0.39 0.19 302.434);
--chart-1: oklch(0.39 0.19 302.434);
--chart-2: oklch(0.327 0.195 270.048);
--chart-3: oklch(0.474 0.204 330.665);
--chart-4: oklch(0.347 0.209 269.787);
--chart-5: oklch(0.391 0.194 301.954);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.108 0.014 311.451);
--foreground: oklch(0.974 0.006 310.385);
--muted: oklch(0.163 0.023 285.806);
--muted-foreground: oklch(0.732 0.01 288.464);
--popover: oklch(0.108 0.014 311.451);
--popover-foreground: oklch(0.974 0.006 310.385);
--card: oklch(0.108 0.014 311.451);
--card-foreground: oklch(0.974 0.006 310.385);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.39 0.19 302.434);
--primary-foreground: oklch(0.925 0.041 310.03);
--secondary: oklch(0.327 0.195 270.048);
--secondary-foreground: oklch(0.914 0.038 287.923);
--accent: oklch(0.474 0.204 330.665);
--accent-foreground: oklch(0.935 0.046 327.484);
--destructive: oklch(0.659 0.223 32.326);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.39 0.19 302.434);
--chart-1: oklch(0.39 0.19 302.434);
--chart-2: oklch(0.327 0.195 270.048);
--chart-3: oklch(0.474 0.204 330.665);
--chart-4: oklch(0.347 0.209 269.787);
--chart-5: oklch(0.391 0.194 301.954);
}