Government is a shadcn/ui theme built around a neutral gray primary color (#474847) with neutral gray accents (#474848). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#474847) on a neutral background (#030705).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030705black |
| Foreground | #04150cblack | #f6f9f7whitesmoke |
| Card | #fcfcfcsnow | #040b08black |
| Card foreground | #03110ablack | #f9fbfamintcream |
| Popover | #ffffffwhite | #030705black |
| Popover foreground | #04150cblack | #f6f9f7whitesmoke |
| Primary | #474847darkslategray | #474847darkslategray |
| Primary foreground | #e0e1e0gainsboro | #e0e1e0gainsboro |
| Secondary | #474847darkslategray | #474847darkslategray |
| Secondary foreground | #e0e1e0gainsboro | #e0e1e0gainsboro |
| Muted | #d5edd4gainsboro | #132b12black |
| Muted foreground | #576657dimgray | #99a899darkgray |
| Accent | #474848darkslategray | #474848darkslategray |
| Accent foreground | #e0e1e1gainsboro | #e0e1e1gainsboro |
| Destructive | #d41c08firebrick | #f7402borangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #474847darkslategray | #474847darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.78:1 | AAA |
| Text on card | 18.87:1 | AAA |
| Primary button | 7.00:1 | AAA |
| Secondary button | 7.00:1 | AAA |
| Muted text | 4.89:1 | AA |
| Accent | 7.00:1 | AAA |
| Destructive | 5.30:1 | AA |
| Text on background | 19.09:1 | AAA |
| Text on card | 19.12:1 | AAA |
| Primary button | 7.00:1 | AAA |
| Secondary button | 7.00:1 | AAA |
| Muted text | 6.10:1 | AA |
| Accent | 7.00:1 | AAA |
| Destructive | 3.66:1 | AA Large |
Paste this into your globals.css to use Government in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.178 0.03 160.203);
--muted: oklch(0.921 0.041 144.779);
--muted-foreground: oklch(0.493 0.03 144.665);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.178 0.03 160.203);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.161 0.026 161.958);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.4 0.002 164.142);
--primary-foreground: oklch(0.908 0.001 164.264);
--secondary: oklch(0.4 0.003 145.048);
--secondary-foreground: oklch(0.908 0.001 145.092);
--accent: oklch(0.401 0.002 195.891);
--accent-foreground: oklch(0.908 0.001 195.961);
--destructive: oklch(0.554 0.215 30.392);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.4 0.002 164.142);
--chart-1: oklch(0.4 0.002 164.142);
--chart-2: oklch(0.4 0.003 145.048);
--chart-3: oklch(0.401 0.002 195.891);
--chart-4: oklch(0.429 0.003 145.047);
--chart-5: oklch(0.404 0.009 163.707);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.013 164.372);
--foreground: oklch(0.979 0.003 164.195);
--muted: oklch(0.261 0.054 143.526);
--muted-foreground: oklch(0.716 0.027 144.83);
--popover: oklch(0.122 0.013 164.372);
--popover-foreground: oklch(0.979 0.003 164.195);
--card: oklch(0.14 0.015 164.287);
--card-foreground: oklch(0.986 0.002 164.226);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.4 0.002 164.142);
--primary-foreground: oklch(0.908 0.001 164.264);
--secondary: oklch(0.4 0.003 145.048);
--secondary-foreground: oklch(0.908 0.001 145.092);
--accent: oklch(0.401 0.002 195.891);
--accent-foreground: oklch(0.908 0.001 195.961);
--destructive: oklch(0.644 0.222 30.344);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.4 0.002 164.142);
--chart-1: oklch(0.4 0.002 164.142);
--chart-2: oklch(0.4 0.003 145.048);
--chart-3: oklch(0.401 0.002 195.891);
--chart-4: oklch(0.429 0.003 145.047);
--chart-5: oklch(0.404 0.009 163.707);
}