Defense is a shadcn/ui theme built around a vivid purple primary color (#cc17e8) with vivid pink accents (#e8179b). The light mode uses a neutral background (#fefbfe). Dark mode keeps the vivid purple primary (#cc17e8) on a neutral background (#040104).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfewhite | #040104black |
| Foreground | #040104black | #fdfcfdwhite |
| Card | #fcf7fdghostwhite | #070208black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fefbfewhite | #040104black |
| Popover foreground | #040104black | #fdfcfdwhite |
| Primary | #cc17e8magenta | #cc17e8magenta |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #6417e8blueviolet | #6417e8blueviolet |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #d7d4degainsboro | #25212bdarkslategray |
| Muted foreground | #564e65dimgray | #a39ab1darkgray |
| Accent | #e8179bdeeppink | #e8179bdeeppink |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #690b07maroon | #ef211acrimson |
| Destructive foreground | #f9aca9lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #cc17e8magenta | #cc17e8magenta |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.19:1 | AAA |
| Text on card | 19.85:1 | AAA |
| Primary button | 4.32:1 | AA Large |
| Secondary button | 7.43:1 | AAA |
| Muted text | 5.36:1 | AA |
| Accent | 4.17:1 | AA Large |
| Destructive | 6.97:1 | AA |
| Text on background | 20.28:1 | AAA |
| Text on card | 20.52:1 | AAA |
| Primary button | 4.32:1 | AA Large |
| Secondary button | 7.43:1 | AAA |
| Muted text | 5.85:1 | AA |
| Accent | 4.17:1 | AA Large |
| Destructive | 4.27:1 | AA Large |
Paste this into your globals.css to use Defense in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.005 321.606);
--foreground: oklch(0.085 0.019 323.394);
--muted: oklch(0.875 0.014 302.684);
--muted-foreground: oklch(0.44 0.039 301.568);
--popover: oklch(0.991 0.005 321.606);
--popover-foreground: oklch(0.085 0.019 323.394);
--card: oklch(0.982 0.009 321.619);
--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.616 0.285 321.299);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.485 0.266 287.473);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.62 0.25 349.735);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.334 0.127 28.776);
--destructive-foreground: oklch(0.817 0.091 21.446);
--ring: oklch(0.616 0.285 321.299);
--chart-1: oklch(0.616 0.285 321.299);
--chart-2: oklch(0.485 0.266 287.473);
--chart-3: oklch(0.62 0.25 349.735);
--chart-4: oklch(0.504 0.26 289.889);
--chart-5: oklch(0.622 0.29 321.193);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.086 0.018 323.227);
--foreground: oklch(0.992 0.001 321.596);
--muted: oklch(0.257 0.019 301.791);
--muted-foreground: oklch(0.702 0.035 302.174);
--popover: oklch(0.086 0.018 323.227);
--popover-foreground: oklch(0.992 0.001 321.596);
--card: oklch(0.108 0.022 323.227);
--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.616 0.285 321.299);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.485 0.266 287.473);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.62 0.25 349.735);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.609 0.235 28.899);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.616 0.285 321.299);
--chart-1: oklch(0.616 0.285 321.299);
--chart-2: oklch(0.485 0.266 287.473);
--chart-3: oklch(0.62 0.25 349.735);
--chart-4: oklch(0.504 0.26 289.889);
--chart-5: oklch(0.622 0.29 321.193);
}