Grub is a shadcn/ui theme built around a neutral gray primary color (#b3afa8) with neutral gray accents (#a8acb3). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#b3afa8) on a neutral background (#030302).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030302black |
| Foreground | #040301black | #f8f8f6whitesmoke |
| Card | #fcfcfcsnow | #070603black |
| Card foreground | #000000black | #fbfaf9snow |
| Popover | #ffffffwhite | #030302black |
| Popover foreground | #040301black | #f8f8f6whitesmoke |
| Primary | #b3afa8darkgray | #b3afa8darkgray |
| Primary foreground | #161513black | #161513black |
| Secondary | #a8acb3darkgray | #a8acb3darkgray |
| Secondary foreground | #131416black | #131416black |
| Muted | #eff2f5whitesmoke | #0a0c10black |
| Muted foreground | #48494cdarkslategray | #b3b5b7silver |
| Accent | #a8acb3darkgray | #a8acb3darkgray |
| Accent foreground | #131416black | #131416black |
| Destructive | #e34602orangered | #fd6321tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b3afa8darkgray | #b3afa8darkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.61:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 8.33:1 | AAA |
| Secondary button | 8.08:1 | AAA |
| Muted text | 7.98:1 | AAA |
| Accent | 8.08:1 | AAA |
| Destructive | 4.08:1 | AA Large |
| Text on background | 19.41:1 | AAA |
| Text on card | 19.47:1 | AAA |
| Primary button | 8.33:1 | AAA |
| Secondary button | 8.08:1 | AAA |
| Muted text | 9.52:1 | AAA |
| Accent | 8.08:1 | AAA |
| Destructive | 6.96:1 | AA |
Paste this into your globals.css to use Grub in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.098 0.013 87.791);
--muted: oklch(0.959 0.006 259.94);
--muted-foreground: oklch(0.406 0.005 259.945);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.098 0.013 87.791);
--card: oklch(0.992 0 161.565);
--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.755 0.011 79.903);
--primary-foreground: oklch(0.195 0.004 79.887);
--secondary: oklch(0.743 0.011 259.945);
--secondary-foreground: oklch(0.191 0.004 259.946);
--accent: oklch(0.743 0.011 259.945);
--accent-foreground: oklch(0.191 0.004 259.946);
--destructive: oklch(0.614 0.203 37.351);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.755 0.011 79.903);
--chart-1: oklch(0.755 0.011 79.903);
--chart-2: oklch(0.743 0.011 259.945);
--chart-3: oklch(0.743 0.011 259.945);
--chart-4: oklch(0.768 0.01 259.945);
--chart-5: oklch(0.757 0.016 79.883);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.095 0.007 84.217);
--foreground: oklch(0.978 0.002 79.931);
--muted: oklch(0.154 0.009 259.864);
--muted-foreground: oklch(0.771 0.004 259.94);
--popover: oklch(0.095 0.007 84.217);
--popover-foreground: oklch(0.978 0.002 79.931);
--card: oklch(0.12 0.008 84.217);
--card-foreground: oklch(0.985 0.001 79.932);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.755 0.011 79.903);
--primary-foreground: oklch(0.195 0.004 79.887);
--secondary: oklch(0.743 0.011 259.945);
--secondary-foreground: oklch(0.191 0.004 259.946);
--accent: oklch(0.743 0.011 259.945);
--accent-foreground: oklch(0.191 0.004 259.946);
--destructive: oklch(0.689 0.201 40.196);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.755 0.011 79.903);
--chart-1: oklch(0.755 0.011 79.903);
--chart-2: oklch(0.743 0.011 259.945);
--chart-3: oklch(0.743 0.011 259.945);
--chart-4: oklch(0.768 0.01 259.945);
--chart-5: oklch(0.757 0.016 79.883);
}