dark is a shadcn/ui theme built around a muted blue primary color (#a7adcd) with muted blue accents (#424b67). The light mode uses a blue-tinted background (#242938). Dark mode switches to a vivid blue primary (#3756f0) on a blue-tinted background (#191d29).
| Token | Light | Dark |
|---|---|---|
| Background | #242938darkslategray | #191d29black |
| Foreground | #a7adcdlightsteelblue | #d1d7fclavender |
| Card | #202432darkslategray | #191d29black |
| Card foreground | #b7bcd7lightsteelblue | #bcc1delightsteelblue |
| Popover | #1e222fdarkslategray | #161a25black |
| Popover foreground | #c8cbe0lightgrey | #c8cbe0lightgrey |
| Primary | #a7adcdlightsteelblue | #3756f0royalblue |
| Primary foreground | #181b2ablack | #d3dafflavender |
| Secondary | #34384bdarkslategray | #2a3043darkslategray |
| Secondary foreground | #d2d4e0lightgrey | #ccd0dalightgrey |
| Muted | #31353fdarkslategray | #232939darkslategray |
| Muted foreground | #afb3c0silver | #5e6a89slategray |
| Accent | #424b67darkslategray | #37415edarkslategray |
| Accent foreground | #e9ebf1lavender | #a3abc4darkgray |
| Destructive | #e53010orangered | #ab2810firebrick |
| Destructive foreground | #ffffffwhite | #ffefeflavenderblush |
| Border | #343742darkslategray | #252b39darkslategray |
| Input | #3a3e4adarkslategray | #293143darkslategray |
| Ring | #a7adcdlightsteelblue | #a7adcdlightsteelblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 6.56:1 | AA |
| Text on card | 8.21:1 | AAA |
| Primary button | 7.71:1 | AAA |
| Secondary button | 7.86:1 | AAA |
| Muted text | 5.87:1 | AA |
| Accent | 7.25:1 | AAA |
| Destructive | 4.41:1 | AA Large |
| Text on background | 11.87:1 | AAA |
| Text on card | 9.42:1 | AAA |
| Primary button | 4.06:1 | AA Large |
| Secondary button | 8.46:1 | AAA |
| Muted text | 2.69:1 | Fail |
| Accent | 4.40:1 | AA Large |
| Destructive | 6.22:1 | AA |
Paste this into your globals.css to use dark in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.282 0.029 270.186);
--foreground: oklch(0.753 0.047 277.322);
--muted: oklch(0.329 0.018 270.801);
--muted-foreground: oklch(0.768 0.019 271.166);
--popover: oklch(0.254 0.025 270.255);
--popover-foreground: oklch(0.846 0.029 277.801);
--card: oklch(0.263 0.026 270.23);
--card-foreground: oklch(0.8 0.038 277.584);
--border: oklch(0.338 0.019 270.795);
--input: oklch(0.366 0.021 270.778);
--primary: oklch(0.753 0.047 277.322);
--primary-foreground: oklch(0.226 0.031 275.943);
--secondary: oklch(0.345 0.034 276.662);
--secondary-foreground: oklch(0.872 0.016 278.043);
--accent: oklch(0.416 0.048 269.994);
--accent-foreground: oklch(0.941 0.008 271.327);
--destructive: oklch(0.598 0.219 31.905);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.753 0.047 277.322);
--chart-1: oklch(0.753 0.047 277.322);
--chart-2: oklch(0.345 0.034 276.662);
--chart-3: oklch(0.416 0.048 269.994);
--chart-4: oklch(0.371 0.038 276.622);
--chart-5: oklch(0.749 0.053 277.197);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.232 0.024 270.171);
--foreground: oklch(0.887 0.051 277.419);
--muted: oklch(0.282 0.031 270.094);
--muted-foreground: oklch(0.526 0.052 268.616);
--popover: oklch(0.218 0.023 270.114);
--popover-foreground: oklch(0.846 0.029 277.801);
--card: oklch(0.234 0.024 270.209);
--card-foreground: oklch(0.815 0.041 277.538);
--border: oklch(0.289 0.027 267.073);
--input: oklch(0.313 0.034 266.814);
--primary: oklch(0.533 0.233 268.121);
--primary-foreground: oklch(0.896 0.051 276.648);
--secondary: oklch(0.313 0.034 270.082);
--secondary-foreground: oklch(0.857 0.014 271.989);
--accent: oklch(0.38 0.052 269.692);
--accent-foreground: oklch(0.743 0.037 270.41);
--destructive: oklch(0.486 0.171 32.204);
--destructive-foreground: oklch(0.966 0.017 17.451);
--ring: oklch(0.753 0.047 277.322);
--chart-1: oklch(0.533 0.233 268.121);
--chart-2: oklch(0.313 0.034 270.082);
--chart-3: oklch(0.38 0.052 269.692);
--chart-4: oklch(0.34 0.038 270.037);
--chart-5: oklch(0.531 0.24 267.761);
}