Dark is a shadcn/ui theme built around a green primary color (#bec48d) with indigo accents (#938dc4). The light mode uses a neutral background (#fbfbf8). Dark mode keeps the green primary (#bec48d) on a neutral background (#030401).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfbf8snow | #030401black |
| Foreground | #101203black | #fbfbf9snow |
| Card | #f9faf5whitesmoke | #070703black |
| Card foreground | #0c0d02black | #fdfdfcwhite |
| Popover | #fbfbf8snow | #030401black |
| Popover foreground | #101203black | #fbfbf9snow |
| Primary | #bec48dtan | #bec48dtan |
| Primary foreground | #13140ablack | #13140ablack |
| Secondary | #938dc4mediumpurple | #938dc4mediumpurple |
| Secondary foreground | #0c0a14black | #0c0a14black |
| Muted | #dbdae7gainsboro | #1a1825black |
| Muted foreground | #5a595fdimgray | #a1a0a6darkgray |
| Accent | #938dc4mediumpurple | #938dc4mediumpurple |
| Accent foreground | #0c0a14black | #0c0a14black |
| Destructive | #b22101firebrick | #f92f01orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #bec48dtan | #bec48dtan |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.30:1 | AAA |
| Text on card | 18.60:1 | AAA |
| Primary button | 10.12:1 | AAA |
| Secondary button | 6.38:1 | AA |
| Muted text | 5.01:1 | AA |
| Accent | 6.38:1 | AA |
| Destructive | 6.76:1 | AA |
| Text on background | 19.84:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 10.12:1 | AAA |
| Secondary button | 6.38:1 | AA |
| Muted text | 6.73:1 | AA |
| Accent | 6.38:1 | AA |
| Destructive | 3.87:1 | AA Large |
Paste this into your globals.css to use Dark in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.004 111.856);
--foreground: oklch(0.174 0.032 114.449);
--muted: oklch(0.893 0.017 291.408);
--muted-foreground: oklch(0.467 0.009 291.421);
--popover: oklch(0.988 0.004 111.856);
--popover-foreground: oklch(0.174 0.032 114.449);
--card: oklch(0.982 0.006 111.896);
--card-foreground: oklch(0.155 0.028 113.83);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.802 0.074 113.501);
--primary-foreground: oklch(0.187 0.019 113.641);
--secondary: oklch(0.668 0.082 289.338);
--secondary-foreground: oklch(0.154 0.021 289.051);
--accent: oklch(0.668 0.082 289.338);
--accent-foreground: oklch(0.154 0.021 289.051);
--destructive: oklch(0.493 0.183 32.685);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.802 0.074 113.501);
--chart-1: oklch(0.802 0.074 113.501);
--chart-2: oklch(0.668 0.082 289.338);
--chart-3: oklch(0.668 0.082 289.338);
--chart-4: oklch(0.699 0.074 289.693);
--chart-5: oklch(0.808 0.081 113.636);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.101 0.012 112.795);
--foreground: oklch(0.987 0.003 111.836);
--muted: oklch(0.218 0.025 289.493);
--muted-foreground: oklch(0.709 0.008 291.568);
--popover: oklch(0.101 0.012 112.795);
--popover-foreground: oklch(0.987 0.003 111.836);
--card: oklch(0.128 0.015 112.795);
--card-foreground: oklch(0.994 0.001 111.808);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.802 0.074 113.501);
--primary-foreground: oklch(0.187 0.019 113.641);
--secondary: oklch(0.668 0.082 289.338);
--secondary-foreground: oklch(0.154 0.021 289.051);
--accent: oklch(0.668 0.082 289.338);
--accent-foreground: oklch(0.154 0.021 289.051);
--destructive: oklch(0.632 0.238 32.182);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.802 0.074 113.501);
--chart-1: oklch(0.802 0.074 113.501);
--chart-2: oklch(0.668 0.082 289.338);
--chart-3: oklch(0.668 0.082 289.338);
--chart-4: oklch(0.699 0.074 289.693);
--chart-5: oklch(0.808 0.081 113.636);
}