Legislation is a shadcn/ui theme built around a violet primary color (#a487ee) with green accents (#d1ee87). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#a487ee) on a neutral background (#020104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020104black |
| Foreground | #020104black | #ffffffwhite |
| Card | #ffffffwhite | #020104black |
| Card foreground | #020104black | #ffffffwhite |
| Popover | #ffffffwhite | #020104black |
| Popover foreground | #020104black | #ffffffwhite |
| Primary | #a487eemediumpurple | #a487eemediumpurple |
| Primary foreground | #16083amidnightblue | #16083amidnightblue |
| Secondary | #d1ee87khaki | #d1ee87khaki |
| Secondary foreground | #2c3a08darkgreen | #2c3a08darkgreen |
| Muted | #e3e6dbgainsboro | #212419black |
| Muted foreground | #616161dimgray | #9e9e9edarkgray |
| Accent | #d1ee87khaki | #d1ee87khaki |
| Accent foreground | #2c3a08darkgreen | #2c3a08darkgreen |
| Destructive | #8d2a0csaddlebrown | #ec5122chocolate |
| Destructive foreground | #fbdad0bisque | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a487eemediumpurple | #a487eemediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.81:1 | AAA |
| Text on card | 20.81:1 | AAA |
| Primary button | 6.41:1 | AA |
| Secondary button | 9.47:1 | AAA |
| Muted text | 4.88:1 | AA |
| Accent | 9.47:1 | AAA |
| Destructive | 6.49:1 | AA |
| Text on background | 20.79:1 | AAA |
| Text on card | 20.79:1 | AAA |
| Primary button | 6.41:1 | AA |
| Secondary button | 9.47:1 | AAA |
| Muted text | 5.89:1 | AA |
| Accent | 9.47:1 | AAA |
| Destructive | 3.63:1 | AA Large |
Paste this into your globals.css to use Legislation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.076 0.02 299.358);
--muted: oklch(0.919 0.014 119.571);
--muted-foreground: oklch(0.492 0 180);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.076 0.02 299.358);
--card: oklch(1 0 180);
--card-foreground: oklch(0.076 0.02 299.358);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.692 0.15 295.258);
--primary-foreground: oklch(0.198 0.089 288.443);
--secondary: oklch(0.905 0.133 122.051);
--secondary-foreground: oklch(0.325 0.073 124.449);
--accent: oklch(0.905 0.133 122.051);
--accent-foreground: oklch(0.325 0.073 124.449);
--destructive: oklch(0.434 0.139 36.043);
--destructive-foreground: oklch(0.913 0.039 37.606);
--ring: oklch(0.692 0.15 295.258);
--chart-1: oklch(0.692 0.15 295.258);
--chart-2: oklch(0.905 0.133 122.051);
--chart-3: oklch(0.905 0.133 122.051);
--chart-4: oklch(0.915 0.12 121.697);
--chart-5: oklch(0.688 0.155 295.051);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.08 0.015 299.343);
--foreground: oklch(1 0 180);
--muted: oklch(0.253 0.019 120.64);
--muted-foreground: oklch(0.7 0 180);
--popover: oklch(0.08 0.015 299.343);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.08 0.015 299.343);
--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.692 0.15 295.258);
--primary-foreground: oklch(0.198 0.089 288.443);
--secondary: oklch(0.905 0.133 122.051);
--secondary-foreground: oklch(0.325 0.073 124.449);
--accent: oklch(0.905 0.133 122.051);
--accent-foreground: oklch(0.325 0.073 124.449);
--destructive: oklch(0.642 0.199 36.389);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.692 0.15 295.258);
--chart-1: oklch(0.692 0.15 295.258);
--chart-2: oklch(0.905 0.133 122.051);
--chart-3: oklch(0.905 0.133 122.051);
--chart-4: oklch(0.915 0.12 121.697);
--chart-5: oklch(0.688 0.155 295.051);
}