Legislation is a shadcn/ui theme built around a vivid deep green primary color (#5b7209) with muted light green accents (#d8dec4). The light mode uses a neutral background (#fbfcf8). Dark mode keeps the vivid deep green primary (#5b7209) on a neutral background (#030401).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfcf8snow | #030401black |
| Foreground | #000000black | #f8f9f6whitesmoke |
| Card | #fbfcf8snow | #030401black |
| Card foreground | #000000black | #f8f9f6whitesmoke |
| Popover | #fbfcf8snow | #030401black |
| Popover foreground | #000000black | #f8f9f6whitesmoke |
| Primary | #5b7209darkolivegreen | #5b7209darkolivegreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #e8ebe0beige | #24261cblack |
| Secondary foreground | #1c1f14black | #c0c4b0silver |
| Muted | #edf1e0beige | #1c1f0eblack |
| Muted foreground | #484847darkslategray | #b8b8b7silver |
| Accent | #d8dec4lightgrey | #373d24darkslategray |
| Accent foreground | #414828darkolivegreen | #d1d7bclightgrey |
| Destructive | #c14015firebrick | #cf4517chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5b7209darkolivegreen | #5b7209darkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.36:1 | AAA |
| Text on card | 20.36:1 | AAA |
| Primary button | 5.45:1 | AA |
| Secondary button | 13.82:1 | AAA |
| Muted text | 7.93:1 | AAA |
| Accent | 6.95:1 | AA |
| Destructive | 5.23:1 | AA |
| Text on background | 19.46:1 | AAA |
| Text on card | 19.46:1 | AAA |
| Primary button | 5.45:1 | AA |
| Secondary button | 8.58:1 | AAA |
| Muted text | 8.42:1 | AAA |
| Accent | 7.65:1 | AAA |
| Destructive | 4.66:1 | AA |
Paste this into your globals.css to use Legislation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.005 116.425);
--foreground: oklch(0 0 0);
--muted: oklch(0.949 0.023 116.767);
--muted-foreground: oklch(0.401 0.002 116.438);
--popover: oklch(0.989 0.005 116.425);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.989 0.005 116.425);
--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.515 0.122 122.63);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.934 0.014 116.598);
--secondary-foreground: oklch(0.232 0.019 117.842);
--accent: oklch(0.889 0.035 117.044);
--accent-foreground: oklch(0.386 0.05 118.788);
--destructive: oklch(0.551 0.172 36.992);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.515 0.122 122.63);
--chart-1: oklch(0.515 0.122 122.63);
--chart-2: oklch(0.934 0.014 116.598);
--chart-3: oklch(0.889 0.035 117.044);
--chart-4: oklch(0.954 0.01 116.513);
--chart-5: oklch(0.52 0.125 122.801);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.101 0.012 116.704);
--foreground: oklch(0.981 0.004 116.41);
--muted: oklch(0.232 0.031 118.841);
--muted-foreground: oklch(0.783 0.002 116.377);
--popover: oklch(0.101 0.012 116.704);
--popover-foreground: oklch(0.981 0.004 116.41);
--card: oklch(0.101 0.012 116.704);
--card-foreground: oklch(0.981 0.004 116.41);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.515 0.122 122.63);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.263 0.018 117.587);
--secondary-foreground: oklch(0.813 0.029 116.973);
--accent: oklch(0.346 0.04 118.5);
--accent-foreground: oklch(0.867 0.037 117.098);
--destructive: oklch(0.579 0.182 36.927);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.515 0.122 122.63);
--chart-1: oklch(0.515 0.122 122.63);
--chart-2: oklch(0.263 0.018 117.587);
--chart-3: oklch(0.346 0.04 118.5);
--chart-4: oklch(0.298 0.022 117.655);
--chart-5: oklch(0.52 0.125 122.801);
}