Intervention is a shadcn/ui theme built around a vivid indigo primary color (#3c2afe) with vivid green accents (#ecfe2a). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid indigo primary (#3c2afe) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #040212black | #ffffffwhite |
| Card | #ffffffwhite | #000000black |
| Card foreground | #040212black | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #040212black | #ffffffwhite |
| Primary | #3c2aferoyalblue | #3c2aferoyalblue |
| Primary foreground | #f6f5ffghostwhite | #f6f5ffghostwhite |
| Secondary | #ecfe2ayellow | #ecfe2ayellow |
| Secondary foreground | #545b00darkolivegreen | #545b00darkolivegreen |
| Muted | #e4e4e2gainsboro | #1d1d1bblack |
| Muted foreground | #4a4b3fdarkslategray | #bfc0b4silver |
| Accent | #ecfe2ayellow | #ecfe2ayellow |
| Accent foreground | #545b00darkolivegreen | #545b00darkolivegreen |
| Destructive | #9e2f0asaddlebrown | #f2683atomato |
| Destructive foreground | #fde5ddmistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3c2aferoyalblue | #3c2aferoyalblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.53:1 | AAA |
| Text on card | 20.53:1 | AAA |
| Primary button | 6.58:1 | AA |
| Secondary button | 6.53:1 | AA |
| Muted text | 6.97:1 | AA |
| Accent | 6.53:1 | AA |
| Destructive | 6.07:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 6.58:1 | AA |
| Secondary button | 6.53:1 | AA |
| Muted text | 9.14:1 | AAA |
| Accent | 6.53:1 | AA |
| Destructive | 6.85:1 | AA |
Paste this into your globals.css to use Intervention in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.109 0.042 283.493);
--muted: oklch(0.919 0.004 110.323);
--muted-foreground: oklch(0.408 0.02 111.153);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.109 0.042 283.493);
--card: oklch(1 0 180);
--card-foreground: oklch(0.109 0.042 283.493);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.491 0.286 272.082);
--primary-foreground: oklch(0.973 0.013 289.986);
--secondary: oklch(0.952 0.208 114.867);
--secondary-foreground: oklch(0.45 0.102 115.229);
--accent: oklch(0.952 0.208 114.867);
--accent-foreground: oklch(0.45 0.102 115.229);
--destructive: oklch(0.471 0.153 36.411);
--destructive-foreground: oklch(0.94 0.028 39.349);
--ring: oklch(0.491 0.286 272.082);
--chart-1: oklch(0.491 0.286 272.082);
--chart-2: oklch(0.952 0.208 114.867);
--chart-3: oklch(0.952 0.208 114.867);
--chart-4: oklch(0.954 0.201 114.562);
--chart-5: oklch(0.491 0.292 271.39);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.231 0.005 110.672);
--muted-foreground: oklch(0.805 0.017 110.642);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.491 0.286 272.082);
--primary-foreground: oklch(0.973 0.013 289.986);
--secondary: oklch(0.952 0.208 114.867);
--secondary-foreground: oklch(0.45 0.102 115.229);
--accent: oklch(0.952 0.208 114.867);
--accent-foreground: oklch(0.45 0.102 115.229);
--destructive: oklch(0.683 0.181 38.374);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.491 0.286 272.082);
--chart-1: oklch(0.491 0.286 272.082);
--chart-2: oklch(0.952 0.208 114.867);
--chart-3: oklch(0.952 0.208 114.867);
--chart-4: oklch(0.954 0.201 114.562);
--chart-5: oklch(0.491 0.292 271.39);
}