Crafty is a shadcn/ui theme built around a near-black primary color (#010f02) with muted light green accents (#dce5dc). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#010f02) on a neutral background (#020803).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020803black |
| Foreground | #031704black | #fbfdfcwhite |
| Card | #ffffffwhite | #020803black |
| Card foreground | #031704black | #fbfdfcwhite |
| Popover | #ffffffwhite | #020803black |
| Popover foreground | #031704black | #fbfdfcwhite |
| Primary | #010f02black | #010f02black |
| Primary foreground | #0ad117limegreen | #0ad117limegreen |
| Secondary | #dce5dcgainsboro | #263627darkslategray |
| Secondary foreground | #3d523edarkslategray | #bdd0bfsilver |
| Muted | #d3e8d5gainsboro | #172c18black |
| Muted foreground | #384739darkslategray | #b8c7b9silver |
| Accent | #dce5dcgainsboro | #263627darkslategray |
| Accent foreground | #3d523edarkslategray | #bdd0bfsilver |
| Destructive | #831f0bmaroon | #eb3814orangered |
| Destructive foreground | #facfc7pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #010f02black | #010f02black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.61:1 | AAA |
| Text on card | 18.61:1 | AAA |
| Primary button | 9.50:1 | AAA |
| Secondary button | 6.57:1 | AA |
| Muted text | 7.67:1 | AAA |
| Accent | 6.57:1 | AA |
| Destructive | 6.80:1 | AA |
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 9.50:1 | AAA |
| Secondary button | 7.91:1 | AAA |
| Muted text | 8.47:1 | AAA |
| Accent | 7.91:1 | AAA |
| Destructive | 4.12:1 | AA Large |
Paste this into your globals.css to use Crafty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.18 0.049 144.946);
--muted: oklch(0.911 0.035 147.16);
--muted-foreground: oklch(0.381 0.031 146.703);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.18 0.049 144.946);
--card: oklch(1 0 180);
--card-foreground: oklch(0.18 0.049 144.946);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.146 0.042 145.123);
--primary-foreground: oklch(0.748 0.25 142.852);
--secondary: oklch(0.913 0.015 147.381);
--secondary-foreground: oklch(0.415 0.042 146.475);
--accent: oklch(0.913 0.015 147.381);
--accent-foreground: oklch(0.415 0.042 146.475);
--destructive: oklch(0.405 0.138 32.928);
--destructive-foreground: oklch(0.89 0.05 31.259);
--ring: oklch(0.146 0.042 145.123);
--chart-1: oklch(0.146 0.042 145.123);
--chart-2: oklch(0.913 0.015 147.381);
--chart-3: oklch(0.913 0.015 147.381);
--chart-4: oklch(0.935 0.011 147.426);
--chart-5: oklch(0.146 0.044 145.036);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.023 146.128);
--foreground: oklch(0.993 0.003 147.515);
--muted: oklch(0.268 0.045 145.666);
--muted-foreground: oklch(0.814 0.026 147.226);
--popover: oklch(0.122 0.023 146.128);
--popover-foreground: oklch(0.993 0.003 147.515);
--card: oklch(0.122 0.023 146.128);
--card-foreground: oklch(0.993 0.003 147.515);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.146 0.042 145.123);
--primary-foreground: oklch(0.748 0.25 142.852);
--secondary: oklch(0.313 0.033 146.434);
--secondary-foreground: oklch(0.84 0.032 147.162);
--accent: oklch(0.313 0.033 146.434);
--accent-foreground: oklch(0.84 0.032 147.162);
--destructive: oklch(0.615 0.219 32.63);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.146 0.042 145.123);
--chart-1: oklch(0.146 0.042 145.123);
--chart-2: oklch(0.313 0.033 146.434);
--chart-3: oklch(0.313 0.033 146.434);
--chart-4: oklch(0.345 0.038 146.396);
--chart-5: oklch(0.146 0.044 145.036);
}