Legal is a shadcn/ui theme built around a green primary color (#6ed880) with red accents (#d8806e). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#6ed880) on a neutral background (#040704).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #040704black |
| Foreground | #010501black | #ffffffwhite |
| Card | #fcfcfcsnow | #050a06black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fcfcfcsnow | #050a06black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #6ed880lightgreen | #6ed880lightgreen |
| Primary foreground | #041006black | #041006black |
| Secondary | #806ed8mediumpurple | #806ed8mediumpurple |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e8e7eelavender | #121118black |
| Muted foreground | #414144darkslategray | #bcbbbesilver |
| Accent | #d8806elightcoral | #d8806elightcoral |
| Accent foreground | #100604black | #100604black |
| Destructive | #dc1e09red | #f63c28orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #6ed880lightgreen | #6ed880lightgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.51:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 10.94:1 | AAA |
| Secondary button | 4.08:1 | AA Large |
| Muted text | 8.29:1 | AAA |
| Accent | 6.88:1 | AA |
| Destructive | 4.94:1 | AA |
| Text on background | 20.28:1 | AAA |
| Text on card | 19.94:1 | AAA |
| Primary button | 10.94:1 | AAA |
| Secondary button | 4.08:1 | AA Large |
| Muted text | 9.82:1 | AAA |
| Accent | 6.88:1 | AA |
| Destructive | 3.74:1 | AA Large |
Paste this into your globals.css to use Legal in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.099 0.023 149.421);
--muted: oklch(0.931 0.009 293.878);
--muted-foreground: oklch(0.377 0.004 293.843);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.798 0.159 147.553);
--primary-foreground: oklch(0.158 0.029 149.195);
--secondary: oklch(0.605 0.157 288.452);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.69 0.114 32.184);
--accent-foreground: oklch(0.139 0.02 36.285);
--destructive: oklch(0.572 0.222 30.394);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.798 0.159 147.553);
--chart-1: oklch(0.798 0.159 147.553);
--chart-2: oklch(0.605 0.157 288.452);
--chart-3: oklch(0.69 0.114 32.184);
--chart-4: oklch(0.637 0.143 289.343);
--chart-5: oklch(0.804 0.166 147.397);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.119 0.011 150.285);
--foreground: oklch(1 0 180);
--muted: oklch(0.182 0.014 292.576);
--muted-foreground: oklch(0.794 0.004 293.978);
--popover: oklch(0.137 0.013 150.285);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.137 0.013 150.285);
--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.798 0.159 147.553);
--primary-foreground: oklch(0.158 0.029 149.195);
--secondary: oklch(0.605 0.157 288.452);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.69 0.114 32.184);
--accent-foreground: oklch(0.139 0.02 36.285);
--destructive: oklch(0.639 0.224 30.407);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.798 0.159 147.553);
--chart-1: oklch(0.798 0.159 147.553);
--chart-2: oklch(0.605 0.157 288.452);
--chart-3: oklch(0.69 0.114 32.184);
--chart-4: oklch(0.637 0.143 289.343);
--chart-5: oklch(0.804 0.166 147.397);
}