Dense is a shadcn/ui theme built around a near-black primary color (#050505) with near-black accents (#050505). The light mode uses a neutral background (#f9fdf6). Dark mode keeps the near-black primary (#050505) on a neutral background (#020401).
| Token | Light | Dark |
|---|---|---|
| Background | #f9fdf6mintcream | #020401black |
| Foreground | #040802black | #f9fcf8mintcream |
| Card | #f9fdf6mintcream | #020401black |
| Card foreground | #040802black | #f9fcf8mintcream |
| Popover | #f9fdf6mintcream | #020401black |
| Popover foreground | #040802black | #f9fcf8mintcream |
| Primary | #050505black | #050505black |
| Primary foreground | #9da19bdarkgray | #9da19bdarkgray |
| Secondary | #050505black | #050505black |
| Secondary foreground | #9b9da1darkgray | #9b9da1darkgray |
| Muted | #dadbddgainsboro | #222325black |
| Muted foreground | #474747darkslategray | #b8b8b8silver |
| Accent | #050505black | #050505black |
| Accent foreground | #a19b9ddarkgray | #a19b9ddarkgray |
| Destructive | #6a2101maroon | #fd5812orangered |
| Destructive foreground | #febc9flightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #050505black | #050505black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.66:1 | AAA |
| Text on card | 19.66:1 | AAA |
| Primary button | 7.76:1 | AAA |
| Secondary button | 7.50:1 | AAA |
| Muted text | 6.69:1 | AA |
| Accent | 7.46:1 | AAA |
| Destructive | 7.06:1 | AAA |
| Text on background | 19.91:1 | AAA |
| Text on card | 19.91:1 | AAA |
| Primary button | 7.76:1 | AAA |
| Secondary button | 7.50:1 | AAA |
| Muted text | 7.91:1 | AAA |
| Accent | 7.46:1 | AAA |
| Destructive | 6.57:1 | AA |
Paste this into your globals.css to use Dense in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.011 133.672);
--foreground: oklch(0.125 0.02 132.111);
--muted: oklch(0.891 0.003 261.513);
--muted-foreground: oklch(0.399 0 180);
--popover: oklch(0.99 0.011 133.672);
--popover-foreground: oklch(0.125 0.02 132.111);
--card: oklch(0.99 0.011 133.672);
--card-foreground: oklch(0.125 0.02 132.111);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.116 0.001 133.517);
--primary-foreground: oklch(0.704 0.009 133.689);
--secondary: oklch(0.115 0.001 261.131);
--secondary-foreground: oklch(0.696 0.006 261.511);
--accent: oklch(0.115 0.001 352.558);
--accent-foreground: oklch(0.696 0.007 352.88);
--destructive: oklch(0.358 0.112 39.763);
--destructive-foreground: oklch(0.848 0.087 44.199);
--ring: oklch(0.116 0.001 133.517);
--chart-1: oklch(0.116 0.001 133.517);
--chart-2: oklch(0.115 0.001 261.131);
--chart-3: oklch(0.115 0.001 352.558);
--chart-4: oklch(0.157 0.001 261.512);
--chart-5: oklch(0.117 0.002 133.43);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.098 0.013 132.366);
--foreground: oklch(0.988 0.006 133.644);
--muted: oklch(0.257 0.005 261.5);
--muted-foreground: oklch(0.781 0 180);
--popover: oklch(0.098 0.013 132.366);
--popover-foreground: oklch(0.988 0.006 133.644);
--card: oklch(0.098 0.013 132.366);
--card-foreground: oklch(0.988 0.006 133.644);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.116 0.001 133.517);
--primary-foreground: oklch(0.704 0.009 133.689);
--secondary: oklch(0.115 0.001 261.131);
--secondary-foreground: oklch(0.696 0.006 261.511);
--accent: oklch(0.115 0.001 352.558);
--accent-foreground: oklch(0.696 0.007 352.88);
--destructive: oklch(0.676 0.211 38.772);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.116 0.001 133.517);
--chart-1: oklch(0.116 0.001 133.517);
--chart-2: oklch(0.115 0.001 261.131);
--chart-3: oklch(0.115 0.001 352.558);
--chart-4: oklch(0.157 0.001 261.512);
--chart-5: oklch(0.117 0.002 133.43);
}