Base16 Dark Flat is a shadcn/ui theme built around a neutral gray primary color (#e0e0e0) with muted blue accents (#476380). The light mode uses a blue-tinted background (#2b3d4f). Dark mode keeps the neutral gray primary (#e0e0e0) on a blue-tinted background (#2b3d4f).
| Token | Light | Dark |
|---|---|---|
| Background | #2b3d4fdarkslategray | #2b3d4fdarkslategray |
| Foreground | #e0e0e0gainsboro | #e0e0e0gainsboro |
| Card | #283848darkslategray | #283848darkslategray |
| Card foreground | #edededwhitesmoke | #edededwhitesmoke |
| Popover | #263645darkslategray | #263645darkslategray |
| Popover foreground | #fafafasnow | #fafafasnow |
| Primary | #e0e0e0gainsboro | #e0e0e0gainsboro |
| Primary foreground | #474747darkslategray | #474747darkslategray |
| Secondary | #404040darkslategray | #404040darkslategray |
| Secondary foreground | #d9d9d9gainsboro | #d9d9d9gainsboro |
| Muted | #3f4750darkslategray | #3f4750darkslategray |
| Muted foreground | #c0c7cesilver | #c0c7cesilver |
| Accent | #476380darkslateblue | #476380darkslateblue |
| Accent foreground | #fcfcfdwhite | #fcfcfdwhite |
| Destructive | #ff2b0aorangered | #ff2b0aorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #3c4a58darkslategray | #3c4a58darkslategray |
| Input | #425261darkslategray | #425261darkslategray |
| Ring | #e0e0e0gainsboro | #e0e0e0gainsboro |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 8.42:1 | AAA |
| Text on card | 10.24:1 | AAA |
| Primary button | 7.06:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 5.49:1 | AA |
| Accent | 6.05:1 | AA |
| Destructive | 3.75:1 | AA Large |
| Text on background | 8.42:1 | AAA |
| Text on card | 10.24:1 | AAA |
| Primary button | 7.06:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 5.49:1 | AA |
| Accent | 6.05:1 | AA |
| Destructive | 3.75:1 | AA Large |
Paste this into your globals.css to use Base16 Dark Flat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.353 0.039 248.97);
--foreground: oklch(0.908 0 180);
--muted: oklch(0.395 0.018 248.291);
--muted-foreground: oklch(0.826 0.012 247.973);
--popover: oklch(0.324 0.035 248.936);
--popover-foreground: oklch(0.985 0 180);
--card: oklch(0.334 0.036 248.948);
--card-foreground: oklch(0.947 0 180);
--border: oklch(0.402 0.03 248.572);
--input: oklch(0.43 0.032 248.584);
--primary: oklch(0.908 0 180);
--primary-foreground: oklch(0.399 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.491 0.058 249.074);
--accent-foreground: oklch(0.992 0.001 247.834);
--destructive: oklch(0.642 0.245 31.113);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.908 0 180);
--chart-1: oklch(0.908 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.491 0.058 249.074);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(0.907 0.002 17.195);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.353 0.039 248.97);
--foreground: oklch(0.908 0 180);
--muted: oklch(0.395 0.018 248.291);
--muted-foreground: oklch(0.826 0.012 247.973);
--popover: oklch(0.324 0.035 248.936);
--popover-foreground: oklch(0.985 0 180);
--card: oklch(0.334 0.036 248.948);
--card-foreground: oklch(0.947 0 180);
--border: oklch(0.402 0.03 248.572);
--input: oklch(0.43 0.032 248.584);
--primary: oklch(0.908 0 180);
--primary-foreground: oklch(0.399 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.491 0.058 249.074);
--accent-foreground: oklch(0.992 0.001 247.834);
--destructive: oklch(0.642 0.245 31.113);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.908 0 180);
--chart-1: oklch(0.908 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.491 0.058 249.074);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(0.907 0.002 17.195);
}