Allegation is a shadcn/ui theme built around a near-black primary color (#0c0604) with near-black accents (#0c0a04). The light mode uses a neutral background (#fefcfb). Dark mode keeps the near-black primary (#0c0604) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fefcfbsnow | #000000black |
| Foreground | #080402black | #ffffffwhite |
| Card | #fefcfbsnow | #000000black |
| Card foreground | #080402black | #ffffffwhite |
| Popover | #fefcfbsnow | #000000black |
| Popover foreground | #080402black | #ffffffwhite |
| Primary | #0c0604black | #0c0604black |
| Primary foreground | #d18f71darksalmon | #d18f71darksalmon |
| Secondary | #0c0405black | #0c0405black |
| Secondary foreground | #d17182palevioletred | #d17182palevioletred |
| Muted | #e5e1e2gainsboro | #1e1a1bblack |
| Muted foreground | #4b3a3ddarkslategray | #c5b4b7silver |
| Accent | #0c0a04black | #0c0a04black |
| Accent foreground | #a69136peru | #a69136peru |
| Destructive | #950e09darkred | #f12e27crimson |
| Destructive foreground | #fcd5d4mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0c0604black | #0c0604black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.94:1 | AAA |
| Text on card | 19.94:1 | AAA |
| Primary button | 7.54:1 | AAA |
| Secondary button | 6.18:1 | AA |
| Muted text | 8.21:1 | AAA |
| Accent | 6.34:1 | AA |
| Destructive | 6.67:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 7.54:1 | AAA |
| Secondary button | 6.18:1 | AA |
| Muted text | 8.68:1 | AAA |
| Accent | 6.34:1 | AA |
| Destructive | 4.06:1 | AA Large |
Paste this into your globals.css to use Allegation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.003 46.824);
--foreground: oklch(0.114 0.015 56.778);
--muted: oklch(0.913 0.004 4.439);
--muted-foreground: oklch(0.367 0.025 6.069);
--popover: oklch(0.992 0.003 46.824);
--popover-foreground: oklch(0.114 0.015 56.778);
--card: oklch(0.992 0.003 46.824);
--card-foreground: oklch(0.114 0.015 56.778);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.131 0.013 53.815);
--primary-foreground: oklch(0.708 0.091 45.676);
--secondary: oklch(0.121 0.019 4.795);
--secondary-foreground: oklch(0.66 0.122 9.296);
--accent: oklch(0.144 0.016 99.564);
--accent-foreground: oklch(0.658 0.112 96.449);
--destructive: oklch(0.426 0.166 29.016);
--destructive-foreground: oklch(0.906 0.044 20.33);
--ring: oklch(0.131 0.013 53.815);
--chart-1: oklch(0.131 0.013 53.815);
--chart-2: oklch(0.121 0.019 4.795);
--chart-3: oklch(0.144 0.016 99.564);
--chart-4: oklch(0.158 0.029 8.493);
--chart-5: oklch(0.131 0.014 54.252);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.223 0.006 5.052);
--muted-foreground: oklch(0.786 0.02 4.985);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.131 0.013 53.815);
--primary-foreground: oklch(0.708 0.091 45.676);
--secondary: oklch(0.121 0.019 4.795);
--secondary-foreground: oklch(0.66 0.122 9.296);
--accent: oklch(0.144 0.016 99.564);
--accent-foreground: oklch(0.658 0.112 96.449);
--destructive: oklch(0.62 0.229 28.355);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.131 0.013 53.815);
--chart-1: oklch(0.131 0.013 53.815);
--chart-2: oklch(0.121 0.019 4.795);
--chart-3: oklch(0.144 0.016 99.564);
--chart-4: oklch(0.158 0.029 8.493);
--chart-5: oklch(0.131 0.014 54.252);
}