Hat is a shadcn/ui theme built around a near-white primary color (#fbf8fc) with near-white accents (#f9fcf8). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the near-white primary (#fbf8fc) on a violet-tinted background (#09050b).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfdwhite | #09050bblack |
| Foreground | #100614black | #ffffffwhite |
| Card | #fdfcfdwhite | #09050bblack |
| Card foreground | #100614black | #ffffffwhite |
| Popover | #fdfcfdwhite | #09050bblack |
| Popover foreground | #100614black | #ffffffwhite |
| Primary | #fbf8fcghostwhite | #fbf8fcghostwhite |
| Primary foreground | #703d85rebeccapurple | #703d85rebeccapurple |
| Secondary | #f9fcf8mintcream | #f9fcf8mintcream |
| Secondary foreground | #273f1ddarkslategray | #273f1ddarkslategray |
| Muted | #ecf0ealinen | #10150fblack |
| Muted foreground | #5a6855dimgray | #9daa97darkgray |
| Accent | #f9fcf8mintcream | #f9fcf8mintcream |
| Accent foreground | #273f1ddarkslategray | #273f1ddarkslategray |
| Destructive | #a64511saddlebrown | #d95b17chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fbf8fcghostwhite | #fbf8fcghostwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.33:1 | AAA |
| Text on card | 19.33:1 | AAA |
| Primary button | 7.39:1 | AAA |
| Secondary button | 11.17:1 | AAA |
| Muted text | 5.14:1 | AA |
| Accent | 11.17:1 | AAA |
| Destructive | 6.00:1 | AA |
| Text on background | 20.27:1 | AAA |
| Text on card | 20.27:1 | AAA |
| Primary button | 7.39:1 | AAA |
| Secondary button | 11.17:1 | AAA |
| Muted text | 7.58:1 | AAA |
| Accent | 11.17:1 | AAA |
| Destructive | 3.85:1 | AA Large |
Paste this into your globals.css to use Hat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 316.6);
--foreground: oklch(0.146 0.033 316.357);
--muted: oklch(0.951 0.01 136.64);
--muted-foreground: oklch(0.499 0.034 136.824);
--popover: oklch(0.991 0.003 316.6);
--popover-foreground: oklch(0.146 0.033 316.357);
--card: oklch(0.991 0.003 316.6);
--card-foreground: oklch(0.146 0.033 316.357);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.982 0.006 316.592);
--primary-foreground: oklch(0.454 0.125 315.579);
--secondary: oklch(0.987 0.006 136.626);
--secondary-foreground: oklch(0.338 0.064 137.431);
--accent: oklch(0.987 0.006 136.626);
--accent-foreground: oklch(0.338 0.064 137.431);
--destructive: oklch(0.514 0.141 43.831);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.982 0.006 316.592);
--chart-1: oklch(0.982 0.006 316.592);
--chart-2: oklch(0.987 0.006 136.626);
--chart-3: oklch(0.987 0.006 136.626);
--chart-4: oklch(1.006 0.003 316.601);
--chart-5: oklch(0.982 0.006 316.59);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.019 317.927);
--foreground: oklch(1 0 180);
--muted: oklch(0.189 0.015 136.859);
--muted-foreground: oklch(0.722 0.031 136.74);
--popover: oklch(0.124 0.019 317.927);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.124 0.019 317.927);
--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.982 0.006 316.592);
--primary-foreground: oklch(0.454 0.125 315.579);
--secondary: oklch(0.987 0.006 136.626);
--secondary-foreground: oklch(0.338 0.064 137.431);
--accent: oklch(0.987 0.006 136.626);
--accent-foreground: oklch(0.338 0.064 137.431);
--destructive: oklch(0.623 0.174 43.394);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.982 0.006 316.592);
--chart-1: oklch(0.982 0.006 316.592);
--chart-2: oklch(0.987 0.006 136.626);
--chart-3: oklch(0.987 0.006 136.626);
--chart-4: oklch(1.006 0.003 316.601);
--chart-5: oklch(0.982 0.006 316.59);
}