Grandma is a shadcn/ui theme built around a near-black primary color (#171717) with near-black accents (#171717). The light mode uses a neutral background (#fefbfb). Dark mode keeps the near-black primary (#171717) on a neutral background (#080202).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfbsnow | #080202black |
| Foreground | #040101black | #faf9f9snow |
| Card | #fdf7f7snow | #0c0303black |
| Card foreground | #000000black | #fdfcfcsnow |
| Popover | #fdf7f7snow | #0c0303black |
| Popover foreground | #000000black | #fdfcfcsnow |
| Primary | #171717black | #171717black |
| Primary foreground | #b0b0b0darkgray | #b0b0b0darkgray |
| Secondary | #171717black | #171717black |
| Secondary foreground | #b0b0b0darkgray | #b0b0b0darkgray |
| Muted | #f3e7e7linen | #180c0cblack |
| Muted foreground | #494646darkslategray | #b9b6b6silver |
| Accent | #171717black | #171717black |
| Accent foreground | #b0b0b0darkgray | #b0b0b0darkgray |
| Destructive | #892d0bsaddlebrown | #ec5018orangered |
| Destructive foreground | #fbd8cbbisque | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #171717black | #171717black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.19:1 | AAA |
| Text on card | 19.81:1 | AAA |
| Primary button | 8.27:1 | AAA |
| Secondary button | 8.27:1 | AAA |
| Muted text | 7.73:1 | AAA |
| Accent | 8.27:1 | AAA |
| Destructive | 6.48:1 | AA |
| Text on background | 19.56:1 | AAA |
| Text on card | 19.87:1 | AAA |
| Primary button | 8.27:1 | AAA |
| Secondary button | 8.27:1 | AAA |
| Muted text | 9.52:1 | AAA |
| Accent | 8.27:1 | AAA |
| Destructive | 3.65:1 | AA Large |
Paste this into your globals.css to use Grandma in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 17.211);
--foreground: oklch(0.08 0.018 22.07);
--muted: oklch(0.938 0.014 17.399);
--muted-foreground: oklch(0.397 0.004 17.318);
--popover: oklch(0.981 0.006 17.265);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.981 0.006 17.265);
--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.204 0 180);
--primary-foreground: oklch(0.757 0 180);
--secondary: oklch(0.204 0 180);
--secondary-foreground: oklch(0.757 0 180);
--accent: oklch(0.204 0 180);
--accent-foreground: oklch(0.757 0 180);
--destructive: oklch(0.43 0.132 37.876);
--destructive-foreground: oklch(0.908 0.043 41.018);
--ring: oklch(0.204 0 180);
--chart-1: oklch(0.204 0 180);
--chart-2: oklch(0.204 0 180);
--chart-3: oklch(0.204 0 180);
--chart-4: oklch(0.238 0 161.565);
--chart-5: oklch(0.203 0.002 17.337);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.104 0.018 20.492);
--foreground: oklch(0.984 0.001 17.176);
--muted: oklch(0.171 0.022 19.579);
--muted-foreground: oklch(0.779 0.003 17.227);
--popover: oklch(0.119 0.02 20.52);
--popover-foreground: oklch(0.992 0.001 17.167);
--card: oklch(0.119 0.02 20.52);
--card-foreground: oklch(0.992 0.001 17.167);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.204 0 180);
--primary-foreground: oklch(0.757 0 180);
--secondary: oklch(0.204 0 180);
--secondary-foreground: oklch(0.757 0 180);
--accent: oklch(0.204 0 180);
--accent-foreground: oklch(0.757 0 180);
--destructive: oklch(0.641 0.201 37.569);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.204 0 180);
--chart-1: oklch(0.204 0 180);
--chart-2: oklch(0.204 0 180);
--chart-3: oklch(0.204 0 180);
--chart-4: oklch(0.238 0 161.565);
--chart-5: oklch(0.203 0.002 17.337);
}