Legitimacy is a shadcn/ui theme built around a deep violet primary color (#4c1a6b) with deep purple accents (#6b1a61). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#4c1a6b) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #0f0316black | #faf9fbghostwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #0c0212black | #fdfcfdwhite |
| Popover | #fcfcfcsnow | #030303black |
| Popover foreground | #0c0212black | #fdfcfdwhite |
| Primary | #4c1a6bindigo | #4c1a6bindigo |
| Primary foreground | #e0c6f1thistle | #e0c6f1thistle |
| Secondary | #231a6bmidnightblue | #231a6bmidnightblue |
| Secondary foreground | #cbc6f1thistle | #cbc6f1thistle |
| Muted | #d8d7e0gainsboro | #201f28black |
| Muted foreground | #61606cdimgray | #94939flightslategray |
| Accent | #6b1a61purple | #6b1a61purple |
| Accent foreground | #f1c6ecthistle | #f1c6ecthistle |
| Destructive | #d03e16firebrick | #de4217orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4c1a6bindigo | #4c1a6bindigo |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.09:1 | AAA |
| Text on card | 19.89:1 | AAA |
| Primary button | 8.12:1 | AAA |
| Secondary button | 9.01:1 | AAA |
| Muted text | 4.33:1 | AA Large |
| Accent | 7.22:1 | AAA |
| Destructive | 4.79:1 | AA |
| Text on background | 20.00:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 8.12:1 | AAA |
| Secondary button | 9.01:1 | AAA |
| Muted text | 5.35:1 | AA |
| Accent | 7.22:1 | AAA |
| Destructive | 4.29:1 | AA Large |
Paste this into your globals.css to use Legitimacy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.137 0.048 312.108);
--muted: oklch(0.883 0.012 291.529);
--muted-foreground: oklch(0.494 0.019 291.03);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.126 0.043 313.326);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.126 0.043 313.326);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.338 0.135 309.04);
--primary-foreground: oklch(0.861 0.066 312.467);
--secondary: oklch(0.291 0.133 279.463);
--secondary-foreground: oklch(0.843 0.06 290.387);
--accent: oklch(0.38 0.141 333.175);
--accent-foreground: oklch(0.874 0.07 330.034);
--destructive: oklch(0.574 0.189 35.068);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.338 0.135 309.04);
--chart-1: oklch(0.338 0.135 309.04);
--chart-2: oklch(0.291 0.133 279.463);
--chart-3: oklch(0.38 0.141 333.175);
--chart-4: oklch(0.312 0.145 279.124);
--chart-5: oklch(0.338 0.14 308.741);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.983 0.003 312.963);
--muted: oklch(0.246 0.016 290.506);
--muted-foreground: oklch(0.668 0.018 291.269);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.992 0.002 312.974);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.992 0.002 312.974);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.338 0.135 309.04);
--primary-foreground: oklch(0.861 0.066 312.467);
--secondary: oklch(0.291 0.133 279.463);
--secondary-foreground: oklch(0.843 0.06 290.387);
--accent: oklch(0.38 0.141 333.175);
--accent-foreground: oklch(0.874 0.07 330.034);
--destructive: oklch(0.602 0.199 35.021);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.338 0.135 309.04);
--chart-1: oklch(0.338 0.135 309.04);
--chart-2: oklch(0.291 0.133 279.463);
--chart-3: oklch(0.38 0.141 333.175);
--chart-4: oklch(0.312 0.145 279.124);
--chart-5: oklch(0.338 0.14 308.741);
}