Defensive is a shadcn/ui theme built around a blue primary color (#5e81d9) with indigo accents (#795ed9). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the blue primary (#5e81d9) on a blue-tinted background (#05060a).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfcfdwhite | #05060ablack |
| Foreground | #040810black | #fcfcfdwhite |
| Card | #f8f9fbghostwhite | #07090eblack |
| Card foreground | #03060cblack | #ffffffwhite |
| Popover | #f8f9fbghostwhite | #07090eblack |
| Popover foreground | #03060cblack | #ffffffwhite |
| Primary | #5e81d9cornflowerblue | #5e81d9cornflowerblue |
| Primary foreground | #000000black | #000000black |
| Secondary | #5ebed9mediumturquoise | #5ebed9mediumturquoise |
| Secondary foreground | #010304black | #010304black |
| Muted | #dfe9eclavender | #131d20black |
| Muted foreground | #4e646adimgray | #95abb1darkgray |
| Accent | #795ed9slateblue | #795ed9slateblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #901604darkred | #fa5238tomato |
| Destructive foreground | #fecfc8pink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5e81d9cornflowerblue | #5e81d9cornflowerblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.56:1 | AAA |
| Text on card | 19.30:1 | AAA |
| Primary button | 5.61:1 | AA |
| Secondary button | 9.73:1 | AAA |
| Muted text | 5.07:1 | AA |
| Accent | 4.76:1 | AA |
| Destructive | 6.48:1 | AA |
| Text on background | 19.71:1 | AAA |
| Text on card | 19.95:1 | AAA |
| Primary button | 5.61:1 | AA |
| Secondary button | 9.73:1 | AAA |
| Muted text | 7.13:1 | AAA |
| Accent | 4.76:1 | AA |
| Destructive | 6.32:1 | AA |
Paste this into your globals.css to use Defensive in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 268.78);
--foreground: oklch(0.132 0.021 262.332);
--muted: oklch(0.928 0.011 216.067);
--muted-foreground: oklch(0.486 0.028 216.464);
--popover: oklch(0.983 0.003 268.769);
--popover-foreground: oklch(0.12 0.018 260.882);
--card: oklch(0.983 0.003 268.769);
--card-foreground: oklch(0.12 0.018 260.882);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.618 0.14 266.156);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.755 0.098 218.426);
--secondary-foreground: oklch(0.096 0.011 211.35);
--accent: oklch(0.571 0.181 289.373);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.422 0.158 31.52);
--destructive-foreground: oklch(0.894 0.053 28.356);
--ring: oklch(0.618 0.14 266.156);
--chart-1: oklch(0.618 0.14 266.156);
--chart-2: oklch(0.755 0.098 218.426);
--chart-3: oklch(0.571 0.181 289.373);
--chart-4: oklch(0.772 0.092 217.964);
--chart-5: oklch(0.615 0.146 265.994);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.01 264.396);
--foreground: oklch(0.992 0.001 268.781);
--muted: oklch(0.223 0.015 216.641);
--muted-foreground: oklch(0.727 0.026 216.228);
--popover: oklch(0.138 0.012 265.546);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.138 0.012 265.546);
--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.618 0.14 266.156);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.755 0.098 218.426);
--secondary-foreground: oklch(0.096 0.011 211.35);
--accent: oklch(0.571 0.181 289.373);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.667 0.208 31.541);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.618 0.14 266.156);
--chart-1: oklch(0.618 0.14 266.156);
--chart-2: oklch(0.755 0.098 218.426);
--chart-3: oklch(0.571 0.181 289.373);
--chart-4: oklch(0.772 0.092 217.964);
--chart-5: oklch(0.615 0.146 265.994);
}