Defensive is a shadcn/ui theme built around a vivid deep blue primary color (#061038) with vivid deep yellow accents (#382d06). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the vivid deep blue primary (#061038) on a blue-tinted background (#04050c).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfcfewhite | #04050cblack |
| Foreground | #000000black | #ffffffwhite |
| Card | #fbfcfewhite | #04050cblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fbfcfewhite | #04050cblack |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #061038black | #061038black |
| Primary foreground | #7d96f2cornflowerblue | #7d96f2cornflowerblue |
| Secondary | #382d06black | #382d06black |
| Secondary foreground | #e9bd20goldenrod | #e9bd20goldenrod |
| Muted | #e6e5e0gainsboro | #1f1e19black |
| Muted foreground | #504f4edarkslategray | #b1b0afdarkgray |
| Accent | #382d06black | #382d06black |
| Accent foreground | #e9bd20goldenrod | #e9bd20goldenrod |
| Destructive | #d44508chocolate | #f76526tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #061038black | #061038black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.39:1 | AAA |
| Text on card | 20.39:1 | AAA |
| Primary button | 6.59:1 | AA |
| Secondary button | 7.63:1 | AAA |
| Muted text | 6.45:1 | AA |
| Accent | 7.63:1 | AAA |
| Destructive | 4.52:1 | AA |
| Text on background | 20.32:1 | AAA |
| Text on card | 20.32:1 | AAA |
| Primary button | 6.59:1 | AA |
| Secondary button | 7.63:1 | AAA |
| Muted text | 7.73:1 | AAA |
| Accent | 7.63:1 | AAA |
| Destructive | 6.85:1 | AA |
Paste this into your globals.css to use Defensive in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 273.826);
--foreground: oklch(0 0 0);
--muted: oklch(0.92 0.006 93.936);
--muted-foreground: oklch(0.429 0.002 93.917);
--popover: oklch(0.99 0.003 273.826);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.99 0.003 273.826);
--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.196 0.078 266.326);
--primary-foreground: oklch(0.695 0.138 270.776);
--secondary: oklch(0.3 0.056 92.78);
--secondary-foreground: oklch(0.815 0.16 91.238);
--accent: oklch(0.3 0.056 92.78);
--accent-foreground: oklch(0.815 0.16 91.238);
--destructive: oklch(0.587 0.188 38.128);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.196 0.078 266.326);
--chart-1: oklch(0.196 0.078 266.326);
--chart-2: oklch(0.3 0.056 92.78);
--chart-3: oklch(0.3 0.056 92.78);
--chart-4: oklch(0.346 0.066 92.266);
--chart-5: oklch(0.195 0.081 265.802);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.119 0.017 267.506);
--foreground: oklch(1 0 180);
--muted: oklch(0.233 0.008 94.215);
--muted-foreground: oklch(0.758 0.002 93.891);
--popover: oklch(0.119 0.017 267.506);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.119 0.017 267.506);
--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.196 0.078 266.326);
--primary-foreground: oklch(0.695 0.138 270.776);
--secondary: oklch(0.3 0.056 92.78);
--secondary-foreground: oklch(0.815 0.16 91.238);
--accent: oklch(0.3 0.056 92.78);
--accent-foreground: oklch(0.815 0.16 91.238);
--destructive: oklch(0.684 0.193 40.733);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.196 0.078 266.326);
--chart-1: oklch(0.196 0.078 266.326);
--chart-2: oklch(0.3 0.056 92.78);
--chart-3: oklch(0.3 0.056 92.78);
--chart-4: oklch(0.346 0.066 92.266);
--chart-5: oklch(0.195 0.081 265.802);
}