Dark (Molokai) is a shadcn/ui theme built around a near-white primary color (#ffffff) with neutral gray accents (#3f4346). The light mode uses a neutral background (#1b1d1d). Dark mode keeps the near-white primary (#ffffff) on a neutral background (#1b1d1d).
| Token | Light | Dark |
|---|---|---|
| Background | #1b1d1dblack | #1b1d1dblack |
| Foreground | #f8f8f2whitesmoke | #f8f8f2whitesmoke |
| Card | #161718black | #161718black |
| Card foreground | #ffffffwhite | #ffffffwhite |
| Popover | #131515black | #131515black |
| Popover foreground | #ffffffwhite | #ffffffwhite |
| Primary | #ffffffwhite | #ffffffwhite |
| Primary foreground | #333333darkslategray | #333333darkslategray |
| Secondary | #404040darkslategray | #404040darkslategray |
| Secondary foreground | #d9d9d9gainsboro | #d9d9d9gainsboro |
| Muted | #22282bdarkslategray | #22282bdarkslategray |
| Muted foreground | #9ba9b0darkgray | #9ba9b0darkgray |
| Accent | #3f4346darkslategray | #3f4346darkslategray |
| Accent foreground | #dadcddgainsboro | #dadcddgainsboro |
| Destructive | #ec0704red | #ec0704red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #292929darkslategray | #292929darkslategray |
| Input | #303030darkslategray | #303030darkslategray |
| Ring | #ffffffwhite | #ffffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 15.95:1 | AAA |
| Text on card | 17.91:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.20:1 | AA |
| Accent | 7.22:1 | AAA |
| Destructive | 4.56:1 | AA |
| Text on background | 15.95:1 | AAA |
| Text on card | 17.91:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.20:1 | AA |
| Accent | 7.22:1 | AAA |
| Destructive | 4.56:1 | AA |
Paste this into your globals.css to use Dark (Molokai) in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.227 0.003 228.949);
--foreground: oklch(0.977 0.008 106.548);
--muted: oklch(0.271 0.01 229.315);
--muted-foreground: oklch(0.727 0.019 229.118);
--popover: oklch(0.193 0.003 228.927);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.205 0.003 228.935);
--card-foreground: oklch(1 0 180);
--border: oklch(0.28 0 180);
--input: oklch(0.311 0 180);
--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.381 0.007 228.999);
--accent-foreground: oklch(0.893 0.003 228.795);
--destructive: oklch(0.594 0.242 29.268);
--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.381 0.007 228.999);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.227 0.003 228.949);
--foreground: oklch(0.977 0.008 106.548);
--muted: oklch(0.271 0.01 229.315);
--muted-foreground: oklch(0.727 0.019 229.118);
--popover: oklch(0.193 0.003 228.927);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.205 0.003 228.935);
--card-foreground: oklch(1 0 180);
--border: oklch(0.28 0 180);
--input: oklch(0.311 0 180);
--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.381 0.007 228.999);
--accent-foreground: oklch(0.893 0.003 228.795);
--destructive: oklch(0.594 0.242 29.268);
--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.381 0.007 228.999);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}