Hearty is a shadcn/ui theme built around a muted deep green primary color (#0b130c) with muted light green accents (#e7eee7). The light mode uses a neutral background (#fbfefb). Dark mode keeps the muted deep green primary (#0b130c) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefbwhite | #000000black |
| Foreground | #031703black | #fcfdfcwhite |
| Card | #fbfefbwhite | #000000black |
| Card foreground | #031703black | #fcfdfcwhite |
| Popover | #fbfefbwhite | #000000black |
| Popover foreground | #031703black | #fcfdfcwhite |
| Primary | #0b130cblack | #0b130cblack |
| Primary foreground | #92bf93darkseagreen | #92bf93darkseagreen |
| Secondary | #e7eee7beige | #2f322fdarkslategray |
| Secondary foreground | #19241ablack | #c7ccc7silver |
| Muted | #cee3cflightgrey | #1c311ddarkslategray |
| Muted foreground | #556256dimgray | #9daa9ddarkgray |
| Accent | #e7eee7beige | #2f322fdarkslategray |
| Accent foreground | #19241ablack | #c7ccc7silver |
| Destructive | #ac1b02firebrick | #fd5335tomato |
| Destructive foreground | #ffe5e1mistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0b130cblack | #0b130cblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.29:1 | AAA |
| Text on card | 18.29:1 | AAA |
| Primary button | 9.05:1 | AAA |
| Secondary button | 13.60:1 | AAA |
| Muted text | 4.75:1 | AA |
| Accent | 13.60:1 | AAA |
| Destructive | 6.03:1 | AA |
| Text on background | 20.59:1 | AAA |
| Text on card | 20.59:1 | AAA |
| Primary button | 9.05:1 | AAA |
| Secondary button | 7.94:1 | AAA |
| Muted text | 5.78:1 | AA |
| Accent | 7.94:1 | AAA |
| Destructive | 6.46:1 | AA |
Paste this into your globals.css to use Hearty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.004 146.509);
--foreground: oklch(0.18 0.05 144.018);
--muted: oklch(0.895 0.035 146.196);
--muted-foreground: oklch(0.482 0.025 146.073);
--popover: oklch(0.993 0.004 146.509);
--popover-foreground: oklch(0.18 0.05 144.018);
--card: oklch(0.993 0.004 146.509);
--card-foreground: oklch(0.18 0.05 144.018);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.177 0.02 145.505);
--primary-foreground: oklch(0.76 0.078 145.595);
--secondary: oklch(0.942 0.012 146.434);
--secondary-foreground: oklch(0.246 0.024 145.648);
--accent: oklch(0.942 0.012 146.434);
--accent-foreground: oklch(0.246 0.024 145.648);
--destructive: oklch(0.478 0.181 31.753);
--destructive-foreground: oklch(0.942 0.029 29.602);
--ring: oklch(0.177 0.02 145.505);
--chart-1: oklch(0.177 0.02 145.505);
--chart-2: oklch(0.942 0.012 146.434);
--chart-3: oklch(0.942 0.012 146.434);
--chart-4: oklch(0.964 0.007 146.476);
--chart-5: oklch(0.178 0.022 145.389);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.993 0.002 146.525);
--muted: oklch(0.287 0.045 145.057);
--muted-foreground: oklch(0.723 0.023 146.262);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.993 0.002 146.525);
--card: oklch(0 0 0);
--card-foreground: oklch(0.993 0.002 146.525);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.177 0.02 145.505);
--primary-foreground: oklch(0.76 0.078 145.595);
--secondary: oklch(0.314 0.008 146.302);
--secondary-foreground: oklch(0.839 0.007 146.465);
--accent: oklch(0.314 0.008 146.302);
--accent-foreground: oklch(0.839 0.007 146.465);
--destructive: oklch(0.673 0.211 32.374);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.177 0.02 145.505);
--chart-1: oklch(0.177 0.02 145.505);
--chart-2: oklch(0.314 0.008 146.302);
--chart-3: oklch(0.314 0.008 146.302);
--chart-4: oklch(0.344 0.01 146.295);
--chart-5: oklch(0.178 0.022 145.389);
}