Midnight is a shadcn/ui theme built around a muted deep green primary color (#2f513f) with muted deep teal accents (#2f5150). The light mode uses a neutral background (#fbfefc). Dark mode keeps the muted deep green primary (#2f513f) on a green-tinted background (#04100a).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefcwhite | #04100ablack |
| Foreground | #010403black | #ffffffwhite |
| Card | #f8fcfamintcream | #05140cblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f8fcfamintcream | #05140cblack |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #2f513fdarkslategray | #2f513fdarkslategray |
| Primary foreground | #cee3d8gainsboro | #cee3d8gainsboro |
| Secondary | #2f512fdarkslategray | #2f512fdarkslategray |
| Secondary foreground | #cfe3celightgrey | #cfe3celightgrey |
| Muted | #f1f4f1whitesmoke | #0b0e0bblack |
| Muted foreground | #3e513ddarkslategray | #aec2aesilver |
| Accent | #2f5150darkslategray | #2f5150darkslategray |
| Accent foreground | #cee3e3gainsboro | #cee3e3gainsboro |
| Destructive | #61230amaroon | #e95d25chocolate |
| Destructive foreground | #f6bda7lightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2f513fdarkslategray | #2f513fdarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.24:1 | AAA |
| Text on card | 20.31:1 | AAA |
| Primary button | 6.59:1 | AA |
| Secondary button | 6.64:1 | AA |
| Muted text | 7.72:1 | AAA |
| Accent | 6.51:1 | AA |
| Destructive | 7.27:1 | AAA |
| Text on background | 19.34:1 | AAA |
| Text on card | 18.83:1 | AAA |
| Primary button | 6.59:1 | AA |
| Secondary button | 6.64:1 | AA |
| Muted text | 10.26:1 | AAA |
| Accent | 6.51:1 | AA |
| Destructive | 6.05:1 | AA |
Paste this into your globals.css to use Midnight in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 164.208);
--foreground: oklch(0.098 0.013 164.395);
--muted: oklch(0.963 0.006 145.06);
--muted-foreground: oklch(0.414 0.041 144.376);
--popover: oklch(0.988 0.006 164.129);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.988 0.006 164.129);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.403 0.051 160.446);
--primary-foreground: oklch(0.898 0.026 163.511);
--secondary: oklch(0.399 0.069 143.787);
--secondary-foreground: oklch(0.895 0.035 144.82);
--accent: oklch(0.409 0.04 194.331);
--accent-foreground: oklch(0.901 0.022 195.553);
--destructive: oklch(0.345 0.098 39.786);
--destructive-foreground: oklch(0.845 0.073 42.578);
--ring: oklch(0.403 0.051 160.446);
--chart-1: oklch(0.403 0.051 160.446);
--chart-2: oklch(0.399 0.069 143.787);
--chart-3: oklch(0.409 0.04 194.331);
--chart-4: oklch(0.431 0.076 143.765);
--chart-5: oklch(0.407 0.056 160.022);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.159 0.024 162.154);
--foreground: oklch(1 0 180);
--muted: oklch(0.161 0.009 144.713);
--muted-foreground: oklch(0.792 0.035 144.784);
--popover: oklch(0.176 0.028 160.452);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.176 0.028 160.452);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.403 0.051 160.446);
--primary-foreground: oklch(0.898 0.026 163.511);
--secondary: oklch(0.399 0.069 143.787);
--secondary-foreground: oklch(0.895 0.035 144.82);
--accent: oklch(0.409 0.04 194.331);
--accent-foreground: oklch(0.901 0.022 195.553);
--destructive: oklch(0.652 0.186 39.67);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.403 0.051 160.446);
--chart-1: oklch(0.403 0.051 160.446);
--chart-2: oklch(0.399 0.069 143.787);
--chart-3: oklch(0.409 0.04 194.331);
--chart-4: oklch(0.431 0.076 143.765);
--chart-5: oklch(0.407 0.056 160.022);
}