Dutiful is a shadcn/ui theme built around a green primary color (#97ce9d) with purple accents (#ce97c8). The light mode uses a neutral background (#f7fdf7). Dark mode keeps the green primary (#97ce9d) on a neutral background (#030704).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fdf7mintcream | #030704black |
| Foreground | #041606black | #ffffffwhite |
| Card | #f3fcf4honeydew | #050a06black |
| Card foreground | #031105black | #ffffffwhite |
| Popover | #f7fdf7mintcream | #030704black |
| Popover foreground | #041606black | #ffffffwhite |
| Primary | #97ce9ddarkseagreen | #97ce9ddarkseagreen |
| Primary foreground | #102312black | #102312black |
| Secondary | #ce97c8plum | #ce97c8plum |
| Secondary foreground | #231021black | #231021black |
| Muted | #e7cfe5gainsboro | #30182ddarkslategray |
| Muted foreground | #645e63dimgray | #a19ba0darkgray |
| Accent | #ce97c8plum | #ce97c8plum |
| Accent foreground | #231021black | #231021black |
| Destructive | #a62303firebrick | #fc5e36tomato |
| Destructive foreground | #fee3dcmistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #97ce9ddarkseagreen | #97ce9ddarkseagreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.13:1 | AAA |
| Text on card | 18.45:1 | AAA |
| Primary button | 9.15:1 | AAA |
| Secondary button | 7.60:1 | AAA |
| Muted text | 4.35:1 | AA Large |
| Accent | 7.60:1 | AAA |
| Destructive | 6.02:1 | AA |
| Text on background | 20.27:1 | AAA |
| Text on card | 19.93:1 | AAA |
| Primary button | 9.15:1 | AAA |
| Secondary button | 7.60:1 | AAA |
| Muted text | 5.97:1 | AA |
| Accent | 7.60:1 | AAA |
| Destructive | 6.77:1 | AA |
Paste this into your globals.css to use Dutiful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.01 149.013);
--foreground: oklch(0.177 0.041 146.734);
--muted: oklch(0.881 0.039 329.64);
--muted-foreground: oklch(0.489 0.011 329.389);
--popover: oklch(0.988 0.01 149.013);
--popover-foreground: oklch(0.177 0.041 146.734);
--card: oklch(0.982 0.015 148.951);
--card-foreground: oklch(0.16 0.036 147.167);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.8 0.089 147.724);
--primary-foreground: oklch(0.233 0.039 146.878);
--secondary: oklch(0.744 0.092 330.494);
--secondary-foreground: oklch(0.208 0.042 331.269);
--accent: oklch(0.744 0.092 330.494);
--accent-foreground: oklch(0.208 0.042 331.269);
--destructive: oklch(0.473 0.171 33.456);
--destructive-foreground: oklch(0.936 0.032 34.306);
--ring: oklch(0.8 0.089 147.724);
--chart-1: oklch(0.8 0.089 147.724);
--chart-2: oklch(0.744 0.092 330.494);
--chart-3: oklch(0.744 0.092 330.494);
--chart-4: oklch(0.77 0.082 330.318);
--chart-5: oklch(0.804 0.096 147.608);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.12 0.013 148.409);
--foreground: oklch(1 0 180);
--muted: oklch(0.25 0.052 331.367);
--muted-foreground: oklch(0.697 0.01 329.298);
--popover: oklch(0.12 0.013 148.409);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.137 0.015 148.409);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.8 0.089 147.724);
--primary-foreground: oklch(0.233 0.039 146.878);
--secondary: oklch(0.744 0.092 330.494);
--secondary-foreground: oklch(0.208 0.042 331.269);
--accent: oklch(0.744 0.092 330.494);
--accent-foreground: oklch(0.208 0.042 331.269);
--destructive: oklch(0.683 0.201 35.028);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.8 0.089 147.724);
--chart-1: oklch(0.8 0.089 147.724);
--chart-2: oklch(0.744 0.092 330.494);
--chart-3: oklch(0.744 0.092 330.494);
--chart-4: oklch(0.77 0.082 330.318);
--chart-5: oklch(0.804 0.096 147.608);
}