Hardhat is a shadcn/ui theme built around a vivid yellow primary color (#f6fc83) with vivid indigo accents (#8983fc). The light mode uses a neutral background (#fcfcf8). Dark mode keeps the vivid yellow primary (#f6fc83) on a yellow-tinted background (#0f0f05).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfcf8snow | #0f0f05black |
| Foreground | #111203black | #fdfdfcwhite |
| Card | #fcfcf8snow | #0f0f05black |
| Card foreground | #111203black | #fdfdfcwhite |
| Popover | #fcfcf8snow | #0f0f05black |
| Popover foreground | #111203black | #fdfdfcwhite |
| Primary | #f6fc83khaki | #f6fc83khaki |
| Primary foreground | #474b02darkolivegreen | #474b02darkolivegreen |
| Secondary | #8983fcmediumslateblue | #8983fcmediumslateblue |
| Secondary foreground | #06024bmidnightblue | #06024bmidnightblue |
| Muted | #dbdbe1gainsboro | #1e1e24black |
| Muted foreground | #494955darkslategray | #aaaab6darkgray |
| Accent | #8983fcmediumslateblue | #8983fcmediumslateblue |
| Accent foreground | #06024bmidnightblue | #06024bmidnightblue |
| Destructive | #981706darkred | #f53319orangered |
| Destructive foreground | #fdd8d3mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f6fc83khaki | #f6fc83khaki |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.39:1 | AAA |
| Text on card | 18.39:1 | AAA |
| Primary button | 8.41:1 | AAA |
| Secondary button | 5.98:1 | AA |
| Muted text | 6.41:1 | AA |
| Accent | 5.98:1 | AA |
| Destructive | 6.48:1 | AA |
| Text on background | 18.92:1 | AAA |
| Text on card | 18.92:1 | AAA |
| Primary button | 8.41:1 | AAA |
| Secondary button | 5.98:1 | AA |
| Muted text | 7.21:1 | AAA |
| Accent | 5.98:1 | AA |
| Destructive | 3.90:1 | AA Large |
Paste this into your globals.css to use Hardhat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.006 108.827);
--foreground: oklch(0.176 0.031 111.497);
--muted: oklch(0.892 0.009 288.521);
--muted-foreground: oklch(0.41 0.021 287.728);
--popover: oklch(0.99 0.006 108.827);
--popover-foreground: oklch(0.176 0.031 111.497);
--card: oklch(0.99 0.006 108.827);
--card-foreground: oklch(0.176 0.031 111.497);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.962 0.145 111.377);
--primary-foreground: oklch(0.395 0.087 112.937);
--secondary: oklch(0.671 0.175 282.877);
--secondary-foreground: oklch(0.194 0.124 268.901);
--accent: oklch(0.671 0.175 282.877);
--accent-foreground: oklch(0.194 0.124 268.901);
--destructive: oklch(0.437 0.165 30.976);
--destructive-foreground: oklch(0.912 0.042 26.818);
--ring: oklch(0.962 0.145 111.377);
--chart-1: oklch(0.962 0.145 111.377);
--chart-2: oklch(0.671 0.175 282.877);
--chart-3: oklch(0.671 0.175 282.877);
--chart-4: oklch(0.709 0.153 284.053);
--chart-5: oklch(0.967 0.148 111.431);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.164 0.02 110.68);
--foreground: oklch(0.995 0.002 108.754);
--muted: oklch(0.238 0.013 287.692);
--muted-foreground: oklch(0.741 0.018 288.251);
--popover: oklch(0.164 0.02 110.68);
--popover-foreground: oklch(0.995 0.002 108.754);
--card: oklch(0.164 0.02 110.68);
--card-foreground: oklch(0.995 0.002 108.754);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.962 0.145 111.377);
--primary-foreground: oklch(0.395 0.087 112.937);
--secondary: oklch(0.671 0.175 282.877);
--secondary-foreground: oklch(0.194 0.124 268.901);
--accent: oklch(0.671 0.175 282.877);
--accent-foreground: oklch(0.194 0.124 268.901);
--destructive: oklch(0.63 0.231 31.007);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.962 0.145 111.377);
--chart-1: oklch(0.962 0.145 111.377);
--chart-2: oklch(0.671 0.175 282.877);
--chart-3: oklch(0.671 0.175 282.877);
--chart-4: oklch(0.709 0.153 284.053);
--chart-5: oklch(0.967 0.148 111.431);
}