Granular is a shadcn/ui theme built around a vivid green primary color (#9fef61) with vivid green accents (#61ef6b). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the vivid green primary (#9fef61) on a neutral background (#020302).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdfcwhite | #020302black |
| Foreground | #000000black | #fcfdfbsnow |
| Card | #fcfdfcwhite | #020302black |
| Card foreground | #000000black | #fcfdfbsnow |
| Popover | #fcfdfcwhite | #020302black |
| Popover foreground | #000000black | #fcfdfbsnow |
| Primary | #9fef61lightgreen | #9fef61lightgreen |
| Primary foreground | #0e1c03black | #0e1c03black |
| Secondary | #e6ef61khaki | #e6ef61khaki |
| Secondary foreground | #1a1c03black | #1a1c03black |
| Muted | #f2f2e8linen | #16170dblack |
| Muted foreground | #4d4d4ddarkslategray | #b3b3b3darkgray |
| Accent | #61ef6blightgreen | #61ef6blightgreen |
| Accent foreground | #031c04black | #031c04black |
| Destructive | #c41808firebrick | #e11b09red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #9fef61lightgreen | #9fef61lightgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.63:1 | AAA |
| Text on card | 20.63:1 | AAA |
| Primary button | 12.67:1 | AAA |
| Secondary button | 13.97:1 | AAA |
| Muted text | 7.51:1 | AAA |
| Accent | 12.04:1 | AAA |
| Destructive | 6.04:1 | AA |
| Text on background | 20.20:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 12.67:1 | AAA |
| Secondary button | 13.97:1 | AAA |
| Muted text | 8.60:1 | AAA |
| Accent | 12.04:1 | AAA |
| Destructive | 4.80:1 | AA |
Paste this into your globals.css to use Granular in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.002 131.104);
--foreground: oklch(0 0 0);
--muted: oklch(0.959 0.014 109.744);
--muted-foreground: oklch(0.418 0 173.29);
--popover: oklch(0.994 0.002 131.104);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.994 0.002 131.104);
--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.872 0.192 133.766);
--primary-foreground: oklch(0.205 0.051 132.896);
--secondary: oklch(0.92 0.164 112.761);
--secondary-foreground: oklch(0.217 0.043 112.898);
--accent: oklch(0.847 0.214 144.512);
--accent-foreground: oklch(0.199 0.056 144.656);
--destructive: oklch(0.523 0.204 30.079);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.872 0.192 133.766);
--chart-1: oklch(0.872 0.192 133.766);
--chart-2: oklch(0.92 0.164 112.761);
--chart-3: oklch(0.847 0.214 144.512);
--chart-4: oklch(0.926 0.153 112.496);
--chart-5: oklch(0.878 0.198 133.873);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.097 0.009 130.253);
--foreground: oklch(0.994 0.003 131.11);
--muted: oklch(0.2 0.019 111.232);
--muted-foreground: oklch(0.765 0 172.405);
--popover: oklch(0.097 0.009 130.253);
--popover-foreground: oklch(0.994 0.003 131.11);
--card: oklch(0.097 0.009 130.253);
--card-foreground: oklch(0.994 0.003 131.11);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.872 0.192 133.766);
--primary-foreground: oklch(0.205 0.051 132.896);
--secondary: oklch(0.92 0.164 112.761);
--secondary-foreground: oklch(0.217 0.043 112.898);
--accent: oklch(0.847 0.214 144.512);
--accent-foreground: oklch(0.199 0.056 144.656);
--destructive: oklch(0.58 0.227 30.052);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.872 0.192 133.766);
--chart-1: oklch(0.872 0.192 133.766);
--chart-2: oklch(0.92 0.164 112.761);
--chart-3: oklch(0.847 0.214 144.512);
--chart-4: oklch(0.926 0.153 112.496);
--chart-5: oklch(0.878 0.198 133.873);
}