Legal is a shadcn/ui theme built around a muted green primary color (#889763) with muted violet accents (#726397). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#889763) on a green-tinted background (#0c0e07).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0c0e07black |
| Foreground | #030401black | #ffffffwhite |
| Card | #ffffffwhite | #0c0e07black |
| Card foreground | #030401black | #ffffffwhite |
| Popover | #ffffffwhite | #0c0e07black |
| Popover foreground | #030401black | #ffffffwhite |
| Primary | #889763gray | #889763gray |
| Primary foreground | #000000black | #000000black |
| Secondary | #726397slategray | #726397slategray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e8e4f1lavender | #110e1bblack |
| Muted foreground | #3f3c49darkslategray | #bab6c3silver |
| Accent | #726397slategray | #726397slategray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #923702saddlebrown | #fc6f1ddarkorange |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #889763gray | #889763gray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.55:1 | AAA |
| Text on card | 20.55:1 | AAA |
| Primary button | 6.67:1 | AA |
| Secondary button | 5.34:1 | AA |
| Muted text | 8.58:1 | AAA |
| Accent | 5.34:1 | AA |
| Destructive | 7.60:1 | AAA |
| Text on background | 19.46:1 | AAA |
| Text on card | 19.46:1 | AAA |
| Primary button | 6.67:1 | AA |
| Secondary button | 5.34:1 | AA |
| Muted text | 9.59:1 | AAA |
| Accent | 5.34:1 | AA |
| Destructive | 7.39:1 | AAA |
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.104 0.017 119.274);
--muted: oklch(0.925 0.018 298.961);
--muted-foreground: oklch(0.364 0.023 298.209);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.104 0.017 119.274);
--card: oklch(1 0 180);
--card-foreground: oklch(0.104 0.017 119.274);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.652 0.075 121.382);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.534 0.082 296.541);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.534 0.082 296.541);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.459 0.134 43.073);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.652 0.075 121.382);
--chart-1: oklch(0.652 0.075 121.382);
--chart-2: oklch(0.534 0.082 296.541);
--chart-3: oklch(0.534 0.082 296.541);
--chart-4: oklch(0.561 0.08 296.771);
--chart-5: oklch(0.661 0.085 121.647);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.157 0.015 120.347);
--foreground: oklch(1 0 180);
--muted: oklch(0.174 0.028 296.423);
--muted-foreground: oklch(0.784 0.019 298.888);
--popover: oklch(0.157 0.015 120.347);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.157 0.015 120.347);
--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.652 0.075 121.382);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.534 0.082 296.541);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.534 0.082 296.541);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.703 0.191 44.787);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.652 0.075 121.382);
--chart-1: oklch(0.652 0.075 121.382);
--chart-2: oklch(0.534 0.082 296.541);
--chart-3: oklch(0.534 0.082 296.541);
--chart-4: oklch(0.561 0.08 296.771);
--chart-5: oklch(0.661 0.085 121.647);
}