Grateful is a shadcn/ui theme built around a vivid green primary color (#9ca90f) with vivid indigo accents (#1c0fa9). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#9ca90f) on a green-tinted background (#0a0b04).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0a0b04black |
| Foreground | #070803black | #fbfcf8snow |
| Card | #ffffffwhite | #0a0b04black |
| Card foreground | #070803black | #fbfcf8snow |
| Popover | #ffffffwhite | #0a0b04black |
| Popover foreground | #070803black | #fbfcf8snow |
| Primary | #9ca90fdarkgoldenrod | #9ca90fdarkgoldenrod |
| Primary foreground | #000000black | #000000black |
| Secondary | #1c0fa9darkblue | #1c0fa9darkblue |
| Secondary foreground | #eeecfdlavender | #eeecfdlavender |
| Muted | #e5e4f1lavender | #0f0e1bblack |
| Muted foreground | #494856darkslategray | #aaa9b7darkgray |
| Accent | #1c0fa9darkblue | #1c0fa9darkblue |
| Accent foreground | #eeecfdlavender | #eeecfdlavender |
| Destructive | #822e08saddlebrown | #f4783ecoral |
| Destructive foreground | #fbd3c0peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #9ca90fdarkgoldenrod | #9ca90fdarkgoldenrod |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.09:1 | AAA |
| Text on card | 20.09:1 | AAA |
| Primary button | 8.09:1 | AAA |
| Secondary button | 10.70:1 | AAA |
| Muted text | 7.11:1 | AAA |
| Accent | 10.70:1 | AAA |
| Destructive | 6.45:1 | AA |
| Text on background | 19.17:1 | AAA |
| Text on card | 19.17:1 | AAA |
| Primary button | 8.09:1 | AAA |
| Secondary button | 10.70:1 | AAA |
| Muted text | 8.26:1 | AAA |
| Accent | 10.70:1 | AAA |
| Destructive | 7.58:1 | AAA |
Paste this into your globals.css to use Grateful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.129 0.016 111.61);
--muted: oklch(0.923 0.018 289.874);
--muted-foreground: oklch(0.408 0.024 289.127);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.129 0.016 111.61);
--card: oklch(1 0 180);
--card-foreground: oklch(0.129 0.016 111.61);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.7 0.156 115.149);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.35 0.218 269.631);
--secondary-foreground: oklch(0.95 0.023 289.788);
--accent: oklch(0.35 0.218 269.631);
--accent-foreground: oklch(0.95 0.023 289.788);
--destructive: oklch(0.42 0.124 40.737);
--destructive-foreground: oklch(0.896 0.052 46.29);
--ring: oklch(0.7 0.156 115.149);
--chart-1: oklch(0.7 0.156 115.149);
--chart-2: oklch(0.35 0.218 269.631);
--chart-3: oklch(0.35 0.218 269.631);
--chart-4: oklch(0.37 0.232 269.403);
--chart-5: oklch(0.709 0.159 115.244);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.146 0.016 111.567);
--foreground: oklch(0.989 0.004 110.331);
--muted: oklch(0.171 0.028 286.895);
--muted-foreground: oklch(0.74 0.02 289.725);
--popover: oklch(0.146 0.016 111.567);
--popover-foreground: oklch(0.989 0.004 110.331);
--card: oklch(0.146 0.016 111.567);
--card-foreground: oklch(0.989 0.004 110.331);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.7 0.156 115.149);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.35 0.218 269.631);
--secondary-foreground: oklch(0.95 0.023 289.788);
--accent: oklch(0.35 0.218 269.631);
--accent-foreground: oklch(0.95 0.023 289.788);
--destructive: oklch(0.707 0.168 43.617);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.7 0.156 115.149);
--chart-1: oklch(0.7 0.156 115.149);
--chart-2: oklch(0.35 0.218 269.631);
--chart-3: oklch(0.35 0.218 269.631);
--chart-4: oklch(0.37 0.232 269.403);
--chart-5: oklch(0.709 0.159 115.244);
}