Regulation is a shadcn/ui theme built around a muted indigo primary color (#9391a1) with muted green accents (#9fa191). The light mode uses a neutral background (#fcfbfd). Dark mode keeps the muted indigo primary (#9391a1) on a neutral background (#020104).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfdsnow | #020104black |
| Foreground | #020209black | #ffffffwhite |
| Card | #f8f8fcghostwhite | #030308black |
| Card foreground | #010104black | #ffffffwhite |
| Popover | #f8f8fcghostwhite | #030308black |
| Popover foreground | #010104black | #ffffffwhite |
| Primary | #9391a1lightslategray | #9391a1lightslategray |
| Primary foreground | #000000black | #000000black |
| Secondary | #9fa191darkgray | #9fa191darkgray |
| Secondary foreground | #000000black | #000000black |
| Muted | #e5e6dbgainsboro | #232419black |
| Muted foreground | #4f5049darkslategray | #b5b6afdarkgray |
| Accent | #9fa191darkgray | #9fa191darkgray |
| Accent foreground | #000000black | #000000black |
| Destructive | #b01b07firebrick | #f52a0forangered |
| Destructive foreground | #feeeeblinen | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #9391a1lightslategray | #9391a1lightslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.10:1 | AAA |
| Text on card | 19.67:1 | AAA |
| Primary button | 6.79:1 | AA |
| Secondary button | 7.99:1 | AAA |
| Muted text | 6.46:1 | AA |
| Accent | 7.99:1 | AAA |
| Destructive | 6.18:1 | AA |
| Text on background | 20.80:1 | AAA |
| Text on card | 20.61:1 | AAA |
| Primary button | 6.79:1 | AA |
| Secondary button | 7.99:1 | AAA |
| Muted text | 7.67:1 | AAA |
| Accent | 7.99:1 | AAA |
| Destructive | 4.02:1 | AA Large |
Paste this into your globals.css to use Regulation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 291.729);
--foreground: oklch(0.091 0.027 288.388);
--muted: oklch(0.921 0.015 112.08);
--muted-foreground: oklch(0.429 0.012 112.317);
--popover: oklch(0.98 0.005 291.678);
--popover-foreground: oklch(0.072 0.021 288.388);
--card: oklch(0.98 0.005 291.678);
--card-foreground: oklch(0.072 0.021 288.388);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.663 0.024 291.089);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.703 0.023 112.396);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.703 0.023 112.396);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.487 0.185 30.88);
--destructive-foreground: oklch(0.96 0.018 26.576);
--ring: oklch(0.663 0.024 291.089);
--chart-1: oklch(0.663 0.024 291.089);
--chart-2: oklch(0.703 0.023 112.396);
--chart-3: oklch(0.703 0.023 112.396);
--chart-4: oklch(0.726 0.021 112.329);
--chart-5: oklch(0.656 0.033 290.809);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.079 0.014 289.831);
--foreground: oklch(1 0 180);
--muted: oklch(0.256 0.02 113.218);
--muted-foreground: oklch(0.774 0.011 112.039);
--popover: oklch(0.099 0.018 289.831);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.099 0.018 289.831);
--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.663 0.024 291.089);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.703 0.023 112.396);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.703 0.023 112.396);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.623 0.237 30.856);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.663 0.024 291.089);
--chart-1: oklch(0.663 0.024 291.089);
--chart-2: oklch(0.703 0.023 112.396);
--chart-3: oklch(0.703 0.023 112.396);
--chart-4: oklch(0.726 0.021 112.329);
--chart-5: oklch(0.656 0.033 290.809);
}