Hard-hat is a shadcn/ui theme built around a deep indigo primary color (#212060) with deep yellow accents (#5f6020). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the deep indigo primary (#212060) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfbfeghostwhite | #000000black |
| Foreground | #050510black | #fcfcfdwhite |
| Card | #fbfbfeghostwhite | #000000black |
| Card foreground | #050510black | #fcfcfdwhite |
| Popover | #fbfbfeghostwhite | #000000black |
| Popover foreground | #050510black | #fcfcfdwhite |
| Primary | #212060midnightblue | #212060midnightblue |
| Primary foreground | #c6c6eclightsteelblue | #c6c6eclightsteelblue |
| Secondary | #5f6020darkolivegreen | #5f6020darkolivegreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #f3f3f1whitesmoke | #0e0e0cblack |
| Muted foreground | #5c5c47darkolivegreen | #b8b8a3darkgray |
| Accent | #5f6020darkolivegreen | #5f6020darkolivegreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #640502maroon | #fc332ccrimson |
| Destructive foreground | #fd9e9blightsalmon | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #212060midnightblue | #212060midnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.67:1 | AAA |
| Text on card | 19.67:1 | AAA |
| Primary button | 8.82:1 | AAA |
| Secondary button | 6.64:1 | AA |
| Muted text | 6.16:1 | AA |
| Accent | 6.64:1 | AA |
| Destructive | 6.71:1 | AA |
| Text on background | 20.48:1 | AAA |
| Text on card | 20.48:1 | AAA |
| Primary button | 8.82:1 | AAA |
| Secondary button | 6.64:1 | AA |
| Muted text | 9.59:1 | AAA |
| Accent | 6.64:1 | AA |
| Destructive | 3.72:1 | AA Large |
Paste this into your globals.css to use Hard-hat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 287.112);
--foreground: oklch(0.121 0.027 282.595);
--muted: oklch(0.965 0.003 107.227);
--muted-foreground: oklch(0.469 0.033 108.389);
--popover: oklch(0.99 0.003 287.112);
--popover-foreground: oklch(0.121 0.027 282.595);
--card: oklch(0.99 0.003 287.112);
--card-foreground: oklch(0.121 0.027 282.595);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.289 0.11 277.725);
--primary-foreground: oklch(0.838 0.053 285.958);
--secondary: oklch(0.473 0.085 110.159);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.473 0.085 110.159);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.32 0.127 29.73);
--destructive-foreground: oklch(0.795 0.115 22.098);
--ring: oklch(0.289 0.11 277.725);
--chart-1: oklch(0.289 0.11 277.725);
--chart-2: oklch(0.473 0.085 110.159);
--chart-3: oklch(0.473 0.085 110.159);
--chart-4: oklch(0.512 0.093 110.186);
--chart-5: oklch(0.285 0.116 276.875);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.991 0.002 287.136);
--muted: oklch(0.162 0.005 107.69);
--muted-foreground: oklch(0.776 0.029 107.843);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.991 0.002 287.136);
--card: oklch(0 0 0);
--card-foreground: oklch(0.991 0.002 287.136);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.289 0.11 277.725);
--primary-foreground: oklch(0.838 0.053 285.958);
--secondary: oklch(0.473 0.085 110.159);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.473 0.085 110.159);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.643 0.235 28.231);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.289 0.11 277.725);
--chart-1: oklch(0.289 0.11 277.725);
--chart-2: oklch(0.473 0.085 110.159);
--chart-3: oklch(0.473 0.085 110.159);
--chart-4: oklch(0.512 0.093 110.186);
--chart-5: oklch(0.285 0.116 276.875);
}