dark2 is a shadcn/ui theme built around a vivid yellow primary color (#efba0b) with muted light yellow accents (#e4e2dd). The light mode uses a neutral background (#fefdfb). Dark mode keeps the vivid yellow primary (#efba0b) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fefdfbsnow | #000000black |
| Foreground | #040301black | #fcfbf8snow |
| Card | #fdfcf6snow | #030303black |
| Card foreground | #000000black | #fdfdfbsnow |
| Popover | #fdfcf6snow | #030303black |
| Popover foreground | #000000black | #fdfdfbsnow |
| Primary | #efba0borange | #efba0borange |
| Primary foreground | #2c2202black | #2c2202black |
| Secondary | #e4e2ddgainsboro | #171716black |
| Secondary foreground | #504c3fdarkolivegreen | #b2b1aedarkgray |
| Muted | #ecebe9linen | #161513black |
| Muted foreground | #686250dimgray | #afaa97darkgray |
| Accent | #e4e2ddgainsboro | #171716black |
| Accent foreground | #504c3fdarkolivegreen | #b2b1aedarkgray |
| Destructive | #aa2909firebrick | #da350borangered |
| Destructive foreground | #feebe7linen | #ffffffwhite |
| Border | #ebebealinen | #282725darkslategray |
| Input | #ebebealinen | #282725darkslategray |
| Ring | #efba0borange | #efba0borange |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.33:1 | AAA |
| Text on card | 20.42:1 | AAA |
| Primary button | 8.71:1 | AAA |
| Secondary button | 6.64:1 | AA |
| Muted text | 5.11:1 | AA |
| Accent | 6.64:1 | AA |
| Destructive | 6.04:1 | AA |
| Text on background | 20.29:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 8.71:1 | AAA |
| Secondary button | 8.34:1 | AAA |
| Muted text | 7.83:1 | AAA |
| Accent | 8.34:1 | AAA |
| Destructive | 4.67:1 | AA |
Paste this into your globals.css to use dark2 in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.004 92.694);
--foreground: oklch(0.101 0.015 98.171);
--muted: oklch(0.941 0.003 92.688);
--muted-foreground: oklch(0.497 0.029 93.098);
--popover: oklch(0.99 0.007 92.73);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.99 0.007 92.73);
--card-foreground: oklch(0 0 0);
--border: oklch(0.94 0.002 92.675);
--input: oklch(0.94 0.002 92.675);
--primary: oklch(0.813 0.165 87.541);
--primary-foreground: oklch(0.257 0.05 91.903);
--secondary: oklch(0.914 0.008 92.74);
--secondary-foreground: oklch(0.416 0.022 93.068);
--accent: oklch(0.914 0.008 92.74);
--accent-foreground: oklch(0.416 0.022 93.068);
--destructive: oklch(0.485 0.169 33.781);
--destructive-foreground: oklch(0.955 0.021 34.297);
--ring: oklch(0.813 0.165 87.541);
--chart-1: oklch(0.813 0.165 87.541);
--chart-2: oklch(0.914 0.008 92.74);
--chart-3: oklch(0.914 0.008 92.74);
--chart-4: oklch(0.935 0.006 92.718);
--chart-5: oklch(0.821 0.167 87.131);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.988 0.004 92.697);
--muted: oklch(0.196 0.004 92.865);
--muted-foreground: oklch(0.736 0.026 92.968);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.994 0.002 92.677);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.994 0.002 92.677);
--border: oklch(0.273 0.004 92.809);
--input: oklch(0.273 0.004 92.809);
--primary: oklch(0.813 0.165 87.541);
--primary-foreground: oklch(0.257 0.05 91.903);
--secondary: oklch(0.205 0.001 92.724);
--secondary-foreground: oklch(0.76 0.004 92.702);
--accent: oklch(0.205 0.001 92.724);
--accent-foreground: oklch(0.76 0.004 92.702);
--destructive: oklch(0.583 0.206 33.539);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.813 0.165 87.541);
--chart-1: oklch(0.813 0.165 87.541);
--chart-2: oklch(0.205 0.001 92.724);
--chart-3: oklch(0.205 0.001 92.724);
--chart-4: oklch(0.239 0.002 92.731);
--chart-5: oklch(0.821 0.167 87.131);
}