Base16 Dark Grayscale is a shadcn/ui theme built around a neutral gray primary color (#bababa) with neutral gray accents (#363636). The light mode uses a neutral background (#0f0f0f). Dark mode keeps the neutral gray primary (#bababa) on a neutral background (#0f0f0f).
| Token | Light | Dark |
|---|---|---|
| Background | #0f0f0fblack | #0f0f0fblack |
| Foreground | #bababasilver | #bababasilver |
| Card | #0a0a0ablack | #0a0a0ablack |
| Card foreground | #c7c7c7silver | #c7c7c7silver |
| Popover | #080808black | #080808black |
| Popover foreground | #d4d4d4lightgrey | #d4d4d4lightgrey |
| Primary | #bababasilver | #bababasilver |
| Primary foreground | #212121black | #212121black |
| Secondary | #404040darkslategray | #404040darkslategray |
| Secondary foreground | #d9d9d9gainsboro | #d9d9d9gainsboro |
| Muted | #2b2222darkslategray | #2b2222darkslategray |
| Muted foreground | #b09b9brosybrown | #b09b9brosybrown |
| Accent | #363636darkslategray | #363636darkslategray |
| Accent foreground | #cfcfcflightgrey | #cfcfcflightgrey |
| Destructive | #ff401forangered | #ff401forangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #1c1c1cblack | #1c1c1cblack |
| Input | #242424darkslategray | #242424darkslategray |
| Ring | #bababasilver | #bababasilver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 9.85:1 | AAA |
| Text on card | 11.69:1 | AAA |
| Primary button | 8.31:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 5.93:1 | AA |
| Accent | 7.80:1 | AAA |
| Destructive | 3.49:1 | AA Large |
| Text on background | 9.85:1 | AAA |
| Text on card | 11.69:1 | AAA |
| Primary button | 8.31:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 5.93:1 | AA |
| Accent | 7.80:1 | AAA |
| Destructive | 3.49:1 | AA Large |
Paste this into your globals.css to use Base16 Dark Grayscale in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.17 0 180);
--foreground: oklch(0.789 0 171.254);
--muted: oklch(0.261 0.014 18.092);
--muted-foreground: oklch(0.708 0.025 17.766);
--popover: oklch(0.132 0 165.964);
--popover-foreground: oklch(0.869 0 165.964);
--card: oklch(0.146 0 180);
--card-foreground: oklch(0.829 0 180);
--border: oklch(0.227 0 164.055);
--input: oklch(0.259 0 167.471);
--primary: oklch(0.789 0 171.254);
--primary-foreground: oklch(0.248 0 173.29);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.331 0 180);
--accent-foreground: oklch(0.853 0 168.69);
--destructive: oklch(0.657 0.23 32.208);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.789 0 171.254);
--chart-1: oklch(0.789 0 171.254);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.331 0 180);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(0.786 0.005 17.256);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.17 0 180);
--foreground: oklch(0.789 0 171.254);
--muted: oklch(0.261 0.014 18.092);
--muted-foreground: oklch(0.708 0.025 17.766);
--popover: oklch(0.132 0 165.964);
--popover-foreground: oklch(0.869 0 165.964);
--card: oklch(0.146 0 180);
--card-foreground: oklch(0.829 0 180);
--border: oklch(0.227 0 164.055);
--input: oklch(0.259 0 167.471);
--primary: oklch(0.789 0 171.254);
--primary-foreground: oklch(0.248 0 173.29);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.331 0 180);
--accent-foreground: oklch(0.853 0 168.69);
--destructive: oklch(0.657 0.23 32.208);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.789 0 171.254);
--chart-1: oklch(0.789 0 171.254);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.331 0 180);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(0.786 0.005 17.256);
}