First is a shadcn/ui theme built around a deep green primary color (#171c07) with deep violet accents (#0d071c). The light mode uses a neutral background (#fdfefb). Dark mode keeps the deep green primary (#171c07) on a neutral background (#030401).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfefbwhite | #030401black |
| Foreground | #030401black | #ffffffwhite |
| Card | #fdfefbwhite | #030401black |
| Card foreground | #030401black | #ffffffwhite |
| Popover | #fdfefbwhite | #030401black |
| Popover foreground | #030401black | #ffffffwhite |
| Primary | #171c07black | #171c07black |
| Primary foreground | #9bbd32yellowgreen | #9bbd32yellowgreen |
| Secondary | #0d071cblack | #0d071cblack |
| Secondary foreground | #d4cbf1thistle | #d4cbf1thistle |
| Muted | #d9d5e7gainsboro | #1d182ablack |
| Muted foreground | #554e6adimgray | #9c95b1darkgray |
| Accent | #0d071cblack | #0d071cblack |
| Accent foreground | #d4cbf1thistle | #d4cbf1thistle |
| Destructive | #883302saddlebrown | #fc7f36coral |
| Destructive foreground | #fed5bepeachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #171c07black | #171c07black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.30:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 8.04:1 | AAA |
| Secondary button | 12.76:1 | AAA |
| Muted text | 5.44:1 | AA |
| Accent | 12.76:1 | AAA |
| Destructive | 6.15:1 | AA |
| Text on background | 20.54:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 8.04:1 | AAA |
| Secondary button | 12.76:1 | AAA |
| Muted text | 6.03:1 | AA |
| Accent | 12.76:1 | AAA |
| Destructive | 8.20:1 | AAA |
Paste this into your globals.css to use First in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.004 117.896);
--foreground: oklch(0.103 0.015 118.029);
--muted: oklch(0.882 0.025 297.324);
--muted-foreground: oklch(0.442 0.045 295.957);
--popover: oklch(0.995 0.004 117.896);
--popover-foreground: oklch(0.103 0.015 118.029);
--card: oklch(0.995 0.004 117.896);
--card-foreground: oklch(0.103 0.015 118.029);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.216 0.037 121.13);
--primary-foreground: oklch(0.749 0.165 122.865);
--secondary: oklch(0.153 0.043 292.399);
--secondary-foreground: oklch(0.861 0.054 296.707);
--accent: oklch(0.153 0.043 292.399);
--accent-foreground: oklch(0.861 0.054 296.707);
--destructive: oklch(0.436 0.127 43.347);
--destructive-foreground: oklch(0.902 0.056 51.795);
--ring: oklch(0.216 0.037 121.13);
--chart-1: oklch(0.216 0.037 121.13);
--chart-2: oklch(0.153 0.043 292.399);
--chart-3: oklch(0.153 0.043 292.399);
--chart-4: oklch(0.179 0.058 290.875);
--chart-5: oklch(0.218 0.039 121.249);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.102 0.015 118.021);
--foreground: oklch(1 0 180);
--muted: oklch(0.224 0.035 294.933);
--muted-foreground: oklch(0.686 0.041 296.763);
--popover: oklch(0.102 0.015 118.021);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.102 0.015 118.021);
--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.216 0.037 121.13);
--primary-foreground: oklch(0.749 0.165 122.865);
--secondary: oklch(0.153 0.043 292.399);
--secondary-foreground: oklch(0.861 0.054 296.707);
--accent: oklch(0.153 0.043 292.399);
--accent-foreground: oklch(0.861 0.054 296.707);
--destructive: oklch(0.728 0.174 47.228);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.216 0.037 121.13);
--chart-1: oklch(0.216 0.037 121.13);
--chart-2: oklch(0.153 0.043 292.399);
--chart-3: oklch(0.153 0.043 292.399);
--chart-4: oklch(0.179 0.058 290.875);
--chart-5: oklch(0.218 0.039 121.249);
}