Hearty is a shadcn/ui theme built around a neutral gray primary color (#7e7275) with neutral gray accents (#72757e). The light mode uses a neutral background (#fcf8f9). Dark mode keeps the neutral gray primary (#7e7275) on a red-tinted background (#0b0406).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf8f9snow | #0b0406black |
| Foreground | #050102black | #ffffffwhite |
| Card | #faf5f6whitesmoke | #0e0608black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fcf8f9snow | #0b0406black |
| Popover foreground | #050102black | #ffffffwhite |
| Primary | #7e7275gray | #7e7275gray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #757e72gray | #757e72gray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #ecf0ebwhitesmoke | #11140fblack |
| Muted foreground | #575d56dimgray | #a4a9a2darkgray |
| Accent | #72757egray | #72757egray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #6c2509maroon | #ed622cchocolate |
| Destructive foreground | #f8c4aflightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7e7275gray | #7e7275gray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.71:1 | AAA |
| Text on card | 19.43:1 | AAA |
| Primary button | 4.62:1 | AA |
| Secondary button | 4.22:1 | AA Large |
| Muted text | 5.85:1 | AA |
| Accent | 4.61:1 | AA |
| Destructive | 7.07:1 | AAA |
| Text on background | 20.27:1 | AAA |
| Text on card | 20.02:1 | AAA |
| Primary button | 4.62:1 | AA |
| Secondary button | 4.22:1 | AA Large |
| Muted text | 7.74:1 | AAA |
| Accent | 4.61:1 | AA |
| Destructive | 6.38:1 | AA |
Paste this into your globals.css to use Hearty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.004 359.974);
--foreground: oklch(0.079 0.023 359.737);
--muted: oklch(0.95 0.008 137.777);
--muted-foreground: oklch(0.471 0.013 137.811);
--popover: oklch(0.983 0.004 359.974);
--popover-foreground: oklch(0.079 0.023 359.737);
--card: oklch(0.974 0.006 0.03);
--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.564 0.016 0.632);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.581 0.021 137.826);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.562 0.014 271.157);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.368 0.107 39.42);
--destructive-foreground: oklch(0.861 0.066 42.621);
--ring: oklch(0.564 0.016 0.632);
--chart-1: oklch(0.564 0.016 0.632);
--chart-2: oklch(0.581 0.021 137.826);
--chart-3: oklch(0.562 0.014 271.157);
--chart-4: oklch(0.608 0.022 137.826);
--chart-5: oklch(0.559 0.025 1.103);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.015 359.861);
--foreground: oklch(1 0 180);
--muted: oklch(0.187 0.012 137.875);
--muted-foreground: oklch(0.729 0.012 137.79);
--popover: oklch(0.124 0.015 359.861);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.137 0.018 0.937);
--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.564 0.016 0.632);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.581 0.021 137.826);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.562 0.014 271.157);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.665 0.183 40.093);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.564 0.016 0.632);
--chart-1: oklch(0.564 0.016 0.632);
--chart-2: oklch(0.581 0.021 137.826);
--chart-3: oklch(0.562 0.014 271.157);
--chart-4: oklch(0.608 0.022 137.826);
--chart-5: oklch(0.559 0.025 1.103);
}