Defensive is a shadcn/ui theme built around a deep green primary color (#0d1109) with deep green accents (#091109). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#0d1109) on a neutral background (#030302).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030302black |
| Foreground | #0d1505black | #fcfdfcwhite |
| Card | #ffffffwhite | #030302black |
| Card foreground | #0d1505black | #fcfdfcwhite |
| Popover | #ffffffwhite | #030302black |
| Popover foreground | #0d1505black | #fcfdfcwhite |
| Primary | #0d1109black | #0d1109black |
| Primary foreground | #a8c18adarkseagreen | #a8c18adarkseagreen |
| Secondary | #111009black | #111009black |
| Secondary foreground | #96944fgray | #96944fgray |
| Muted | #ebead6antiquewhite | #292814black |
| Muted foreground | #5a5a53dimgray | #acaca5darkgray |
| Accent | #091109black | #091109black |
| Accent foreground | #8cc18adarkseagreen | #8cc18adarkseagreen |
| Destructive | #6a0301maroon | #e30602red |
| Destructive foreground | #fea19flightsalmon | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0d1109black | #0d1109black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.64:1 | AAA |
| Text on card | 18.64:1 | AAA |
| Primary button | 9.69:1 | AAA |
| Secondary button | 6.02:1 | AA |
| Muted text | 5.71:1 | AA |
| Accent | 9.24:1 | AAA |
| Destructive | 6.65:1 | AA |
| Text on background | 20.20:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 9.69:1 | AAA |
| Secondary button | 6.02:1 | AA |
| Muted text | 6.51:1 | AA |
| Accent | 9.24:1 | AAA |
| Destructive | 4.88:1 | AA |
Paste this into your globals.css to use Defensive in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.181 0.033 128.795);
--muted: oklch(0.933 0.027 105.297);
--muted-foreground: oklch(0.465 0.011 105.2);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.181 0.033 128.795);
--card: oklch(1 0 180);
--card-foreground: oklch(0.181 0.033 128.795);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.169 0.017 128.323);
--primary-foreground: oklch(0.779 0.081 128.467);
--secondary: oklch(0.173 0.015 106.222);
--secondary-foreground: oklch(0.653 0.091 106.919);
--accent: oklch(0.165 0.02 143.742);
--accent-foreground: oklch(0.76 0.096 143.765);
--destructive: oklch(0.331 0.133 29.421);
--destructive-foreground: oklch(0.801 0.112 20.889);
--ring: oklch(0.169 0.017 128.323);
--chart-1: oklch(0.169 0.017 128.323);
--chart-2: oklch(0.173 0.015 106.222);
--chart-3: oklch(0.165 0.02 143.742);
--chart-4: oklch(0.216 0.022 106.446);
--chart-5: oklch(0.17 0.019 128.39);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.098 0.01 126.436);
--foreground: oklch(0.993 0.001 127.129);
--muted: oklch(0.273 0.034 106.723);
--muted-foreground: oklch(0.741 0.009 105.03);
--popover: oklch(0.098 0.01 126.436);
--popover-foreground: oklch(0.993 0.001 127.129);
--card: oklch(0.098 0.01 126.436);
--card-foreground: oklch(0.993 0.001 127.129);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.169 0.017 128.323);
--primary-foreground: oklch(0.779 0.081 128.467);
--secondary: oklch(0.173 0.015 106.222);
--secondary-foreground: oklch(0.653 0.091 106.919);
--accent: oklch(0.165 0.02 143.742);
--accent-foreground: oklch(0.76 0.096 143.765);
--destructive: oklch(0.577 0.235 29.308);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.169 0.017 128.323);
--chart-1: oklch(0.169 0.017 128.323);
--chart-2: oklch(0.173 0.015 106.222);
--chart-3: oklch(0.165 0.02 143.742);
--chart-4: oklch(0.216 0.022 106.446);
--chart-5: oklch(0.17 0.019 128.39);
}