After Dark is a shadcn/ui theme built around a near-white primary color (#ffffff) with deep blue accents (#28364d). The light mode uses a blue-tinted background (#0e131b). Dark mode keeps the near-white primary (#ffffff) on a blue-tinted background (#0e131b).
| Token | Light | Dark |
|---|---|---|
| Background | #0e131bblack | #0e131bblack |
| Foreground | #c8d1dflightgrey | #c8d1dflightgrey |
| Card | #0a0e14black | #0a0e14black |
| Card foreground | #d8dfe8gainsboro | #d8dfe8gainsboro |
| Popover | #090c11black | #090c11black |
| Popover foreground | #e9ecf2lavender | #e9ecf2lavender |
| Primary | #ffffffwhite | #ffffffwhite |
| Primary foreground | #333333darkslategray | #333333darkslategray |
| Secondary | #404040darkslategray | #404040darkslategray |
| Secondary foreground | #d9d9d9gainsboro | #d9d9d9gainsboro |
| Muted | #22252bdarkslategray | #22252bdarkslategray |
| Muted foreground | #9ba3b0darkgray | #9ba3b0darkgray |
| Accent | #28364ddarkslategray | #28364ddarkslategray |
| Accent foreground | #c6d0e2lightgrey | #c6d0e2lightgrey |
| Destructive | #fb3a37tomato | #fb3a37tomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #1a1f28black | #1a1f28black |
| Input | #202732darkslategray | #202732darkslategray |
| Ring | #ffffffwhite | #ffffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 12.10:1 | AAA |
| Text on card | 14.38:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.03:1 | AA |
| Accent | 7.81:1 | AAA |
| Destructive | 3.64:1 | AA Large |
| Text on background | 12.10:1 | AAA |
| Text on card | 14.38:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.03:1 | AA |
| Accent | 7.81:1 | AAA |
| Destructive | 3.64:1 | AA Large |
Paste this into your globals.css to use After Dark in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.185 0.018 259.798);
--foreground: oklch(0.858 0.021 259.945);
--muted: oklch(0.264 0.012 259.926);
--muted-foreground: oklch(0.714 0.021 259.942);
--popover: oklch(0.152 0.012 259.489);
--popover-foreground: oklch(0.942 0.009 259.943);
--card: oklch(0.163 0.014 259.834);
--card-foreground: oklch(0.9 0.015 259.946);
--border: oklch(0.24 0.019 259.852);
--input: oklch(0.27 0.023 259.838);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.332 0.045 259.683);
--accent-foreground: oklch(0.856 0.026 259.941);
--destructive: oklch(0.647 0.228 27.096);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.332 0.045 259.683);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.185 0.018 259.798);
--foreground: oklch(0.858 0.021 259.945);
--muted: oklch(0.264 0.012 259.926);
--muted-foreground: oklch(0.714 0.021 259.942);
--popover: oklch(0.152 0.012 259.489);
--popover-foreground: oklch(0.942 0.009 259.943);
--card: oklch(0.163 0.014 259.834);
--card-foreground: oklch(0.9 0.015 259.946);
--border: oklch(0.24 0.019 259.852);
--input: oklch(0.27 0.023 259.838);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.332 0.045 259.683);
--accent-foreground: oklch(0.856 0.026 259.941);
--destructive: oklch(0.647 0.228 27.096);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.332 0.045 259.683);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}