Democracy is a shadcn/ui theme built around a muted light red primary color (#d6c7ca) with muted light blue accents (#c7cad6). The light mode uses a neutral background (#fcf8f9). Dark mode keeps the muted light red primary (#d6c7ca) on a red-tinted background (#0d0708).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf8f9snow | #0d0708black |
| Foreground | #110406black | #ffffffwhite |
| Card | #fcf8f9snow | #0d0708black |
| Card foreground | #110406black | #ffffffwhite |
| Popover | #fcf8f9snow | #0d0708black |
| Popover foreground | #110406black | #ffffffwhite |
| Primary | #d6c7calightgrey | #d6c7calightgrey |
| Primary foreground | #3e2e30darkslategray | #3e2e30darkslategray |
| Secondary | #cad6c7lightgrey | #cad6c7lightgrey |
| Secondary foreground | #303e2edarkslategray | #303e2edarkslategray |
| Muted | #ebf1eawhitesmoke | #10150eblack |
| Muted foreground | #575757dimgray | #a8a8a8darkgray |
| Accent | #c7cad6lightgrey | #c7cad6lightgrey |
| Accent foreground | #2e303edarkslategray | #2e303edarkslategray |
| Destructive | #79100cmaroon | #df1d16crimson |
| Destructive foreground | #f9c0belightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d6c7calightgrey | #d6c7calightgrey |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.08:1 | AAA |
| Text on card | 19.08:1 | AAA |
| Primary button | 7.87:1 | AAA |
| Secondary button | 7.51:1 | AAA |
| Muted text | 6.27:1 | AA |
| Accent | 7.98:1 | AAA |
| Destructive | 7.06:1 | AAA |
| Text on background | 19.96:1 | AAA |
| Text on card | 19.96:1 | AAA |
| Primary button | 7.87:1 | AAA |
| Secondary button | 7.51:1 | AAA |
| Muted text | 7.76:1 | AAA |
| Accent | 7.98:1 | AAA |
| Destructive | 4.86:1 | AA |
Paste this into your globals.css to use Democracy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.004 4.423);
--foreground: oklch(0.132 0.028 6.237);
--muted: oklch(0.951 0.011 139.981);
--muted-foreground: oklch(0.456 0 180);
--popover: oklch(0.982 0.004 4.423);
--popover-foreground: oklch(0.132 0.028 6.237);
--card: oklch(0.982 0.004 4.423);
--card-foreground: oklch(0.132 0.028 6.237);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.843 0.017 4.831);
--primary-foreground: oklch(0.319 0.024 6.271);
--secondary: oklch(0.862 0.024 139.967);
--secondary-foreground: oklch(0.345 0.032 139.919);
--accent: oklch(0.84 0.017 275.899);
--accent-foreground: oklch(0.314 0.024 275.042);
--destructive: oklch(0.37 0.139 28.55);
--destructive-foreground: oklch(0.858 0.065 20.795);
--ring: oklch(0.843 0.017 4.831);
--chart-1: oklch(0.843 0.017 4.831);
--chart-2: oklch(0.862 0.024 139.967);
--chart-3: oklch(0.84 0.017 275.899);
--chart-4: oklch(0.884 0.02 139.971);
--chart-5: oklch(0.841 0.02 4.937);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.012 5.173);
--foreground: oklch(1 0 180);
--muted: oklch(0.188 0.016 139.923);
--muted-foreground: oklch(0.733 0 180);
--popover: oklch(0.139 0.012 5.173);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.139 0.012 5.173);
--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.843 0.017 4.831);
--primary-foreground: oklch(0.319 0.024 6.271);
--secondary: oklch(0.862 0.024 139.967);
--secondary-foreground: oklch(0.345 0.032 139.919);
--accent: oklch(0.84 0.017 275.899);
--accent-foreground: oklch(0.314 0.024 275.042);
--destructive: oklch(0.576 0.224 28.954);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.843 0.017 4.831);
--chart-1: oklch(0.843 0.017 4.831);
--chart-2: oklch(0.862 0.024 139.967);
--chart-3: oklch(0.84 0.017 275.899);
--chart-4: oklch(0.884 0.02 139.971);
--chart-5: oklch(0.841 0.02 4.937);
}