Hazel is a shadcn/ui theme built around a near-white primary color (#fcfcfd) with muted light blue accents (#e7eaee). The light mode uses a neutral background (#fbfcfd). Dark mode keeps the near-white primary (#fcfcfd) on a blue-tinted background (#05070a).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfcfdwhite | #05070ablack |
| Foreground | #000000black | #f5f7fawhitesmoke |
| Card | #fbfcfdwhite | #05070ablack |
| Card foreground | #000000black | #f5f7fawhitesmoke |
| Popover | #fbfcfdwhite | #05070ablack |
| Popover foreground | #000000black | #f5f7fawhitesmoke |
| Primary | #fcfcfdwhite | #fcfcfdwhite |
| Primary foreground | #4b5e7cdarkslateblue | #4b5e7cdarkslateblue |
| Secondary | #e7eaeelavender | #2a2d32darkslategray |
| Secondary foreground | #444f5fdarkslategray | #c2c6cbsilver |
| Muted | #e9ecf1lavender | #0e1116black |
| Muted foreground | #4f5763dimgray | #9ca4b0darkgray |
| Accent | #e7eaeelavender | #2a2d32darkslategray |
| Accent foreground | #444f5fdarkslategray | #c2c6cbsilver |
| Destructive | #7e2a07saddlebrown | #f46a2ftomato |
| Destructive foreground | #fbcebbpeachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fcfcfdwhite | #fcfcfdwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.49:1 | AAA |
| Text on card | 20.49:1 | AAA |
| Primary button | 6.42:1 | AA |
| Secondary button | 6.87:1 | AA |
| Muted text | 6.18:1 | AA |
| Accent | 6.87:1 | AA |
| Destructive | 6.57:1 | AA |
| Text on background | 18.77:1 | AAA |
| Text on card | 18.77:1 | AAA |
| Primary button | 6.42:1 | AA |
| Secondary button | 8.03:1 | AAA |
| Muted text | 7.51:1 | AAA |
| Accent | 8.03:1 | AAA |
| Destructive | 6.94:1 | AA |
Paste this into your globals.css to use Hazel in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.002 258.318);
--foreground: oklch(0 0 0);
--muted: oklch(0.943 0.007 258.332);
--muted-foreground: oklch(0.455 0.022 258.372);
--popover: oklch(0.992 0.002 258.318);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0.002 258.318);
--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.992 0.001 258.315);
--primary-foreground: oklch(0.48 0.054 258.322);
--secondary: oklch(0.936 0.006 258.33);
--secondary-foreground: oklch(0.424 0.031 258.362);
--accent: oklch(0.936 0.006 258.33);
--accent-foreground: oklch(0.424 0.031 258.362);
--destructive: oklch(0.408 0.123 39.608);
--destructive-foreground: oklch(0.887 0.057 44.443);
--ring: oklch(0.992 0.001 258.315);
--chart-1: oklch(0.992 0.001 258.315);
--chart-2: oklch(0.936 0.006 258.33);
--chart-3: oklch(0.936 0.006 258.33);
--chart-4: oklch(0.96 0.004 258.323);
--chart-5: oklch(0.992 0.001 258.316);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.128 0.009 253.556);
--foreground: oklch(0.975 0.005 258.326);
--muted: oklch(0.177 0.011 258.369);
--muted-foreground: oklch(0.715 0.019 258.363);
--popover: oklch(0.128 0.009 253.556);
--popover-foreground: oklch(0.975 0.005 258.326);
--card: oklch(0.128 0.009 253.556);
--card-foreground: oklch(0.975 0.005 258.326);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.992 0.001 258.315);
--primary-foreground: oklch(0.48 0.054 258.322);
--secondary: oklch(0.297 0.009 258.366);
--secondary-foreground: oklch(0.825 0.008 258.337);
--accent: oklch(0.297 0.009 258.366);
--accent-foreground: oklch(0.825 0.008 258.337);
--destructive: oklch(0.686 0.184 41.367);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.992 0.001 258.315);
--chart-1: oklch(0.992 0.001 258.315);
--chart-2: oklch(0.297 0.009 258.366);
--chart-3: oklch(0.297 0.009 258.366);
--chart-4: oklch(0.326 0.01 258.366);
--chart-5: oklch(0.992 0.001 258.316);
}