Defensive is a shadcn/ui theme built around a deep yellow primary color (#35370c) with deep indigo accents (#0d0c37). The light mode uses a neutral background (#fdfdfb). Dark mode keeps the deep yellow primary (#35370c) on a neutral background (#070703).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdfbsnow | #070703black |
| Foreground | #080902black | #fdfdfcwhite |
| Card | #fcfcf8snow | #0a0a05black |
| Card foreground | #040401black | #ffffffwhite |
| Popover | #fdfdfbsnow | #070703black |
| Popover foreground | #080902black | #fdfdfcwhite |
| Primary | #35370cdarkolivegreen | #35370cdarkolivegreen |
| Primary foreground | #d0d539goldenrod | #d0d539goldenrod |
| Secondary | #0d0c37black | #0d0c37black |
| Secondary foreground | #908de7mediumpurple | #908de7mediumpurple |
| Muted | #d6d5e1gainsboro | #1e1e2ablack |
| Muted foreground | #4a4950darkslategray | #b0afb6darkgray |
| Accent | #0d0c37black | #0d0c37black |
| Accent foreground | #908de7mediumpurple | #908de7mediumpurple |
| Destructive | #630603maroon | #f81e16red |
| Destructive foreground | #fc9f9clightsalmon | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #35370cdarkolivegreen | #35370cdarkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.70:1 | AAA |
| Text on card | 19.93:1 | AAA |
| Primary button | 7.80:1 | AAA |
| Secondary button | 6.36:1 | AA |
| Muted text | 6.13:1 | AA |
| Accent | 6.36:1 | AA |
| Destructive | 6.78:1 | AA |
| Text on background | 19.85:1 | AAA |
| Text on card | 19.83:1 | AAA |
| Primary button | 7.80:1 | AAA |
| Secondary button | 6.36:1 | AA |
| Muted text | 7.59:1 | AAA |
| Accent | 6.36:1 | AA |
| Destructive | 4.05:1 | AA Large |
Paste this into your globals.css to use Defensive in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.003 107.988);
--foreground: oklch(0.134 0.021 110.17);
--muted: oklch(0.878 0.017 287.587);
--muted-foreground: oklch(0.409 0.01 287.477);
--popover: oklch(0.995 0.003 107.988);
--popover-foreground: oklch(0.134 0.021 110.17);
--card: oklch(0.99 0.005 108.037);
--card-foreground: oklch(0.106 0.017 110.17);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.324 0.062 111.244);
--primary-foreground: oklch(0.843 0.169 111.455);
--secondary: oklch(0.19 0.081 276.884);
--secondary-foreground: oklch(0.685 0.13 283.923);
--accent: oklch(0.19 0.081 276.884);
--accent-foreground: oklch(0.685 0.13 283.923);
--destructive: oklch(0.318 0.124 29.439);
--destructive-foreground: oklch(0.796 0.111 21.998);
--ring: oklch(0.324 0.062 111.244);
--chart-1: oklch(0.324 0.062 111.244);
--chart-2: oklch(0.19 0.081 276.884);
--chart-3: oklch(0.19 0.081 276.884);
--chart-4: oklch(0.212 0.096 275.908);
--chart-5: oklch(0.328 0.063 111.316);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.01 109.166);
--foreground: oklch(0.993 0.001 107.962);
--muted: oklch(0.24 0.023 286.043);
--muted-foreground: oklch(0.757 0.009 287.727);
--popover: oklch(0.125 0.01 109.166);
--popover-foreground: oklch(0.993 0.001 107.962);
--card: oklch(0.143 0.012 109.166);
--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.324 0.062 111.244);
--primary-foreground: oklch(0.843 0.169 111.455);
--secondary: oklch(0.19 0.081 276.884);
--secondary-foreground: oklch(0.685 0.13 283.923);
--accent: oklch(0.19 0.081 276.884);
--accent-foreground: oklch(0.685 0.13 283.923);
--destructive: oklch(0.623 0.244 29.053);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.324 0.062 111.244);
--chart-1: oklch(0.324 0.062 111.244);
--chart-2: oklch(0.19 0.081 276.884);
--chart-3: oklch(0.19 0.081 276.884);
--chart-4: oklch(0.212 0.096 275.908);
--chart-5: oklch(0.328 0.063 111.316);
}