Gruvbox Light Hard is a shadcn/ui theme built around a neutral gray primary color (#3b3735) with light yellow accents (#efe595). The light mode uses a yellow-tinted background (#f9f5d7). Dark mode keeps the neutral gray primary (#3b3735) on a yellow-tinted background (#f9f5d7).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f5d7beige | #f9f5d7beige |
| Foreground | #3b3735darkslategray | #3b3735darkslategray |
| Card | #f8f3celightgoldenrodyellow | #f8f3celightgoldenrodyellow |
| Card foreground | #2e2b29darkslategray | #2e2b29darkslategray |
| Popover | #f7f2cablanchedalmond | #f7f2cablanchedalmond |
| Popover foreground | #201e1dblack | #201e1dblack |
| Primary | #3b3735darkslategray | #3b3735darkslategray |
| Primary foreground | #d3d0cflightgrey | #d3d0cflightgrey |
| Secondary | #bfbfbfsilver | #bfbfbfsilver |
| Secondary foreground | #262626darkslategray | #262626darkslategray |
| Muted | #e2e1dagainsboro | #e2e1dagainsboro |
| Muted foreground | #4d4b3ddarkslategray | #4d4b3ddarkslategray |
| Accent | #efe595khaki | #efe595khaki |
| Accent foreground | #47400bdarkolivegreen | #47400bdarkolivegreen |
| Destructive | #721403maroon | #721403maroon |
| Destructive foreground | #fdb7aalightpink | #fdb7aalightpink |
| Border | #f2edc4bisque | #f2edc4bisque |
| Input | #efe9b8wheat | #efe9b8wheat |
| Ring | #3b3735darkslategray | #3b3735darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 10.69:1 | AAA |
| Text on card | 12.50:1 | AAA |
| Primary button | 7.66:1 | AAA |
| Secondary button | 8.25:1 | AAA |
| Muted text | 6.69:1 | AA |
| Accent | 8.10:1 | AAA |
| Destructive | 6.88:1 | AA |
| Text on background | 10.69:1 | AAA |
| Text on card | 12.50:1 | AAA |
| Primary button | 7.66:1 | AAA |
| Secondary button | 8.25:1 | AAA |
| Muted text | 6.69:1 | AA |
| Accent | 8.10:1 | AAA |
| Destructive | 6.88:1 | AA |
Paste this into your globals.css to use Gruvbox Light Hard in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.966 0.039 100.921);
--foreground: oklch(0.341 0.006 48.534);
--muted: oklch(0.908 0.009 100.49);
--muted-foreground: oklch(0.411 0.024 101.133);
--popover: oklch(0.954 0.052 101.102);
--popover-foreground: oklch(0.237 0.004 48.564);
--card: oklch(0.958 0.048 101.043);
--card-foreground: oklch(0.29 0.005 48.546);
--border: oklch(0.94 0.053 101.121);
--input: oklch(0.927 0.064 101.273);
--primary: oklch(0.341 0.006 48.534);
--primary-foreground: oklch(0.861 0.004 48.694);
--secondary: oklch(0.805 0 169.695);
--secondary-foreground: oklch(0.27 0 180);
--accent: oklch(0.911 0.101 101.681);
--accent-foreground: oklch(0.368 0.07 101.431);
--destructive: oklch(0.36 0.131 32.424);
--destructive-foreground: oklch(0.841 0.084 30.153);
--ring: oklch(0.341 0.006 48.534);
--chart-1: oklch(0.341 0.006 48.534);
--chart-2: oklch(0.805 0 169.695);
--chart-3: oklch(0.911 0.101 101.681);
--chart-4: oklch(0.829 0 180);
--chart-5: oklch(0.34 0.01 48.413);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.966 0.039 100.921);
--foreground: oklch(0.341 0.006 48.534);
--muted: oklch(0.908 0.009 100.49);
--muted-foreground: oklch(0.411 0.024 101.133);
--popover: oklch(0.954 0.052 101.102);
--popover-foreground: oklch(0.237 0.004 48.564);
--card: oklch(0.958 0.048 101.043);
--card-foreground: oklch(0.29 0.005 48.546);
--border: oklch(0.94 0.053 101.121);
--input: oklch(0.927 0.064 101.273);
--primary: oklch(0.341 0.006 48.534);
--primary-foreground: oklch(0.861 0.004 48.694);
--secondary: oklch(0.805 0 169.695);
--secondary-foreground: oklch(0.27 0 180);
--accent: oklch(0.911 0.101 101.681);
--accent-foreground: oklch(0.368 0.07 101.431);
--destructive: oklch(0.36 0.131 32.424);
--destructive-foreground: oklch(0.841 0.084 30.153);
--ring: oklch(0.341 0.006 48.534);
--chart-1: oklch(0.341 0.006 48.534);
--chart-2: oklch(0.805 0 169.695);
--chart-3: oklch(0.911 0.101 101.681);
--chart-4: oklch(0.829 0 180);
--chart-5: oklch(0.34 0.01 48.413);
}