Habitat is a shadcn/ui theme built around a muted light green primary color (#bbd6b8) with muted light red accents (#d6b8bb). The light mode uses a neutral background (#f8fcf8). Dark mode keeps the muted light green primary (#bbd6b8) on a green-tinted background (#050b04).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fcf8mintcream | #050b04black |
| Foreground | #020802black | #f8fcf8mintcream |
| Card | #f8fcf8mintcream | #050b04black |
| Card foreground | #020802black | #f8fcf8mintcream |
| Popover | #f8fcf8mintcream | #050b04black |
| Popover foreground | #020802black | #f8fcf8mintcream |
| Primary | #bbd6b8silver | #bbd6b8silver |
| Primary foreground | #243a22darkslategray | #243a22darkslategray |
| Secondary | #b8bbd6lightsteelblue | #b8bbd6lightsteelblue |
| Secondary foreground | #22243adarkslategray | #22243adarkslategray |
| Muted | #efeff1whitesmoke | #0e0f10black |
| Muted foreground | #3c3d44darkslategray | #bbbcc3silver |
| Accent | #d6b8bbsilver | #d6b8bbsilver |
| Accent foreground | #3a2224darkslategray | #3a2224darkslategray |
| Destructive | #a72502firebrick | #fd4d1corangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #bbd6b8silver | #bbd6b8silver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.50:1 | AAA |
| Text on card | 19.50:1 | AAA |
| Primary button | 7.87:1 | AAA |
| Secondary button | 8.02:1 | AAA |
| Muted text | 9.40:1 | AAA |
| Accent | 7.95:1 | AAA |
| Destructive | 7.22:1 | AAA |
| Text on background | 19.20:1 | AAA |
| Text on card | 19.20:1 | AAA |
| Primary button | 7.87:1 | AAA |
| Secondary button | 8.02:1 | AAA |
| Muted text | 10.15:1 | AAA |
| Accent | 7.95:1 | AAA |
| Destructive | 3.37:1 | AA Large |
Paste this into your globals.css to use Habitat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.006 142.602);
--foreground: oklch(0.124 0.027 140.624);
--muted: oklch(0.952 0.002 281.25);
--muted-foreground: oklch(0.361 0.012 280.739);
--popover: oklch(0.987 0.006 142.602);
--popover-foreground: oklch(0.124 0.027 140.624);
--card: oklch(0.987 0.006 142.602);
--card-foreground: oklch(0.124 0.027 140.624);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.848 0.051 142.382);
--primary-foreground: oklch(0.323 0.051 141.982);
--secondary: oklch(0.798 0.039 280.465);
--secondary-foreground: oklch(0.269 0.042 278.351);
--accent: oklch(0.809 0.035 11.064);
--accent-foreground: oklch(0.283 0.038 13.297);
--destructive: oklch(0.476 0.17 34.053);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.848 0.051 142.382);
--chart-1: oklch(0.848 0.051 142.382);
--chart-2: oklch(0.798 0.039 280.465);
--chart-3: oklch(0.809 0.035 11.064);
--chart-4: oklch(0.826 0.033 280.615);
--chart-5: oklch(0.85 0.056 142.356);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.02 141.346);
--foreground: oklch(0.987 0.006 142.603);
--muted: oklch(0.167 0.003 280.948);
--muted-foreground: oklch(0.797 0.01 281.09);
--popover: oklch(0.139 0.02 141.346);
--popover-foreground: oklch(0.987 0.006 142.603);
--card: oklch(0.139 0.02 141.346);
--card-foreground: oklch(0.987 0.006 142.603);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.848 0.051 142.382);
--primary-foreground: oklch(0.323 0.051 141.982);
--secondary: oklch(0.798 0.039 280.465);
--secondary-foreground: oklch(0.269 0.042 278.351);
--accent: oklch(0.809 0.035 11.064);
--accent-foreground: oklch(0.283 0.038 13.297);
--destructive: oklch(0.664 0.22 35);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.848 0.051 142.382);
--chart-1: oklch(0.848 0.051 142.382);
--chart-2: oklch(0.798 0.039 280.465);
--chart-3: oklch(0.809 0.035 11.064);
--chart-4: oklch(0.826 0.033 280.615);
--chart-5: oklch(0.85 0.056 142.356);
}