Drafty is a shadcn/ui theme built around a muted deep violet primary color (#18161d) with muted deep green accents (#1b1d16). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted deep violet primary (#18161d) on a neutral background (#040307).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #040307black |
| Foreground | #000000black | #fcfcfdwhite |
| Card | #f8f7fdghostwhite | #06050bblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f8f7fdghostwhite | #06050bblack |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #18161dblack | #18161dblack |
| Primary foreground | #aea8bddarkgray | #aea8bddarkgray |
| Secondary | #1b1d16black | #1b1d16black |
| Secondary foreground | #b7bda8darkgray | #b7bda8darkgray |
| Muted | #e9eddebeige | #1d2112black |
| Muted foreground | #60615cdimgray | #a2a39edarkgray |
| Accent | #1b1d16black | #1b1d16black |
| Accent foreground | #b7bda8darkgray | #b7bda8darkgray |
| Destructive | #b81c00firebrick | #ff330forangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #18161dblack | #18161dblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.34:1 | AAA |
| Text on card | 19.70:1 | AAA |
| Primary button | 7.80:1 | AAA |
| Secondary button | 8.79:1 | AAA |
| Muted text | 5.25:1 | AA |
| Accent | 8.79:1 | AAA |
| Destructive | 6.58:1 | AA |
| Text on background | 20.04:1 | AAA |
| Text on card | 20.34:1 | AAA |
| Primary button | 7.80:1 | AAA |
| Secondary button | 8.79:1 | AAA |
| Muted text | 6.44:1 | AA |
| Accent | 8.79:1 | AAA |
| Destructive | 3.66:1 | AA Large |
Paste this into your globals.css to use Drafty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.004 298.492);
--foreground: oklch(0 0 0);
--muted: oklch(0.94 0.021 118.965);
--muted-foreground: oklch(0.49 0.009 118.889);
--popover: oklch(0.979 0.008 298.416);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.979 0.008 298.416);
--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.205 0.014 297.338);
--primary-foreground: oklch(0.743 0.031 297.833);
--secondary: oklch(0.226 0.014 119.631);
--secondary-foreground: oklch(0.789 0.03 119.238);
--accent: oklch(0.226 0.014 119.631);
--accent-foreground: oklch(0.789 0.03 119.238);
--destructive: oklch(0.501 0.192 31.642);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.205 0.014 297.338);
--chart-1: oklch(0.205 0.014 297.338);
--chart-2: oklch(0.226 0.014 119.631);
--chart-3: oklch(0.226 0.014 119.631);
--chart-4: oklch(0.262 0.017 119.72);
--chart-5: oklch(0.203 0.017 297.048);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.104 0.015 298.472);
--foreground: oklch(0.991 0.002 298.528);
--muted: oklch(0.24 0.029 120.771);
--muted-foreground: oklch(0.714 0.008 118.768);
--popover: oklch(0.119 0.017 298.439);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.119 0.017 298.439);
--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.205 0.014 297.338);
--primary-foreground: oklch(0.743 0.031 297.833);
--secondary: oklch(0.226 0.014 119.631);
--secondary-foreground: oklch(0.789 0.03 119.238);
--accent: oklch(0.226 0.014 119.631);
--accent-foreground: oklch(0.789 0.03 119.238);
--destructive: oklch(0.647 0.24 31.769);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.205 0.014 297.338);
--chart-1: oklch(0.205 0.014 297.338);
--chart-2: oklch(0.226 0.014 119.631);
--chart-3: oklch(0.226 0.014 119.631);
--chart-4: oklch(0.262 0.017 119.72);
--chart-5: oklch(0.203 0.017 297.048);
}