Enforcement is a shadcn/ui theme built around a vivid deep violet primary color (#2d0353) with vivid deep purple accents (#530352). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the vivid deep violet primary (#2d0353) on a neutral background (#030104).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #030104black |
| Foreground | #0d0416black | #ffffffwhite |
| Card | #fcfbfewhite | #030104black |
| Card foreground | #0d0416black | #ffffffwhite |
| Popover | #fcfbfewhite | #030104black |
| Popover foreground | #0d0416black | #ffffffwhite |
| Primary | #2d0353midnightblue | #2d0353midnightblue |
| Primary foreground | #c68efaplum | #c68efaplum |
| Secondary | #050353midnightblue | #050353midnightblue |
| Secondary foreground | #908efamediumpurple | #908efamediumpurple |
| Muted | #d8d8dfgainsboro | #202027black |
| Muted foreground | #575760dimgray | #9f9fa8darkgray |
| Accent | #530352indigo | #530352indigo |
| Accent foreground | #fa8ef9violet | #fa8ef9violet |
| Destructive | #862f09saddlebrown | #f1723btomato |
| Destructive foreground | #fbd6c6peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2d0353midnightblue | #2d0353midnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.49:1 | AAA |
| Text on card | 19.49:1 | AAA |
| Primary button | 6.91:1 | AA |
| Secondary button | 6.48:1 | AA |
| Muted text | 5.02:1 | AA |
| Accent | 6.83:1 | AA |
| Destructive | 6.44:1 | AA |
| Text on background | 20.80:1 | AAA |
| Text on card | 20.80:1 | AAA |
| Primary button | 6.91:1 | AA |
| Secondary button | 6.48:1 | AA |
| Muted text | 6.15:1 | AA |
| Accent | 6.83:1 | AA |
| Destructive | 7.22:1 | AAA |
Paste this into your globals.css to use Enforcement in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 309.084);
--foreground: oklch(0.136 0.043 307.46);
--muted: oklch(0.884 0.01 286.967);
--muted-foreground: oklch(0.461 0.015 286.572);
--popover: oklch(0.99 0.004 309.084);
--popover-foreground: oklch(0.136 0.043 307.46);
--card: oklch(0.99 0.004 309.084);
--card-foreground: oklch(0.136 0.043 307.46);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.249 0.127 299.834);
--primary-foreground: oklch(0.744 0.16 306.726);
--secondary: oklch(0.209 0.133 267.465);
--secondary-foreground: oklch(0.697 0.156 282.337);
--accent: oklch(0.312 0.139 329.099);
--accent-foreground: oklch(0.798 0.183 327.721);
--destructive: oklch(0.427 0.127 39.787);
--destructive-foreground: oklch(0.903 0.047 44.53);
--ring: oklch(0.249 0.127 299.834);
--chart-1: oklch(0.249 0.127 299.834);
--chart-2: oklch(0.209 0.133 267.465);
--chart-3: oklch(0.312 0.139 329.099);
--chart-4: oklch(0.232 0.15 266.972);
--chart-5: oklch(0.249 0.13 299.443);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.08 0.019 310.911);
--foreground: oklch(1 0 180);
--muted: oklch(0.247 0.013 286.137);
--muted-foreground: oklch(0.704 0.013 286.822);
--popover: oklch(0.08 0.019 310.911);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.08 0.019 310.911);
--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.249 0.127 299.834);
--primary-foreground: oklch(0.744 0.16 306.726);
--secondary: oklch(0.209 0.133 267.465);
--secondary-foreground: oklch(0.697 0.156 282.337);
--accent: oklch(0.312 0.139 329.099);
--accent-foreground: oklch(0.798 0.183 327.721);
--destructive: oklch(0.695 0.171 42.154);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.249 0.127 299.834);
--chart-1: oklch(0.249 0.127 299.834);
--chart-2: oklch(0.209 0.133 267.465);
--chart-3: oklch(0.312 0.139 329.099);
--chart-4: oklch(0.232 0.15 266.972);
--chart-5: oklch(0.249 0.13 299.443);
}