Drafty is a shadcn/ui theme built around a deep violet primary color (#38284d) with deep green accents (#3d4d28). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the deep violet primary (#38284d) on a violet-tinted background (#07040c).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #07040cblack |
| Foreground | #020104black | #f7f5f9whitesmoke |
| Card | #faf7fcghostwhite | #090510black |
| Card foreground | #000000black | #faf9fbghostwhite |
| Popover | #faf7fcghostwhite | #090510black |
| Popover foreground | #000000black | #faf9fbghostwhite |
| Primary | #38284ddarkslategray | #38284ddarkslategray |
| Primary foreground | #d2c6e2thistle | #d2c6e2thistle |
| Secondary | #3d4d28darkolivegreen | #3d4d28darkolivegreen |
| Secondary foreground | #d5e2c6lightgrey | #d5e2c6lightgrey |
| Muted | #dfe5d6gainsboro | #22291ablack |
| Muted foreground | #5a5f54dimgray | #a6aba0darkgray |
| Accent | #3d4d28darkolivegreen | #3d4d28darkolivegreen |
| Accent foreground | #d5e2c6lightgrey | #d5e2c6lightgrey |
| Destructive | #640602maroon | #fb1004red |
| Destructive foreground | #fd9f9blightsalmon | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #38284ddarkslategray | #38284ddarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.22:1 | AAA |
| Text on card | 19.80:1 | AAA |
| Primary button | 8.17:1 | AAA |
| Secondary button | 6.73:1 | AA |
| Muted text | 5.11:1 | AA |
| Accent | 6.73:1 | AA |
| Destructive | 6.73:1 | AA |
| Text on background | 18.82:1 | AAA |
| Text on card | 19.24:1 | AAA |
| Primary button | 8.17:1 | AAA |
| Secondary button | 6.73:1 | AA |
| Muted text | 6.40:1 | AA |
| Accent | 6.73:1 | AA |
| Destructive | 4.04:1 | AA Large |
Paste this into your globals.css to use Drafty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 305.692);
--foreground: oklch(0.079 0.019 307.154);
--muted: oklch(0.914 0.022 126.057);
--muted-foreground: oklch(0.477 0.018 126.244);
--popover: oklch(0.98 0.007 305.643);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.98 0.007 305.643);
--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.314 0.068 302.675);
--primary-foreground: oklch(0.844 0.04 305.107);
--secondary: oklch(0.398 0.062 128.118);
--secondary-foreground: oklch(0.895 0.039 126.335);
--accent: oklch(0.398 0.062 128.118);
--accent-foreground: oklch(0.895 0.039 126.335);
--destructive: oklch(0.322 0.126 30.126);
--destructive-foreground: oklch(0.798 0.113 23.167);
--ring: oklch(0.314 0.068 302.675);
--chart-1: oklch(0.314 0.068 302.675);
--chart-2: oklch(0.398 0.062 128.118);
--chart-3: oklch(0.398 0.062 128.118);
--chart-4: oklch(0.432 0.069 128.17);
--chart-5: oklch(0.311 0.074 302.317);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.117 0.024 306.739);
--foreground: oklch(0.974 0.005 305.666);
--muted: oklch(0.269 0.029 127.257);
--muted-foreground: oklch(0.735 0.016 126.032);
--popover: oklch(0.129 0.028 305.327);
--popover-foreground: oklch(0.983 0.004 305.691);
--card: oklch(0.129 0.028 305.327);
--card-foreground: oklch(0.983 0.004 305.691);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.314 0.068 302.675);
--primary-foreground: oklch(0.844 0.04 305.107);
--secondary: oklch(0.398 0.062 128.118);
--secondary-foreground: oklch(0.895 0.039 126.335);
--accent: oklch(0.398 0.062 128.118);
--accent-foreground: oklch(0.895 0.039 126.335);
--destructive: oklch(0.624 0.252 29.562);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.314 0.068 302.675);
--chart-1: oklch(0.314 0.068 302.675);
--chart-2: oklch(0.398 0.062 128.118);
--chart-3: oklch(0.398 0.062 128.118);
--chart-4: oklch(0.432 0.069 128.17);
--chart-5: oklch(0.311 0.074 302.317);
}