Hard is a shadcn/ui theme built around a blue primary color (#394dac) with yellow accents (#ac9939). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#394dac) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #050814black | #fcfcfdwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #040610black | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #050814black | #fcfcfdwhite |
| Primary | #394dacdarkslateblue | #394dacdarkslateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #ac9939peru | #ac9939peru |
| Secondary foreground | #131106black | #131106black |
| Muted | #f6f5efwhitesmoke | #100f09black |
| Muted foreground | #67624cdimgray | #b3af98darkgray |
| Accent | #ac9939peru | #ac9939peru |
| Accent foreground | #131106black | #131106black |
| Destructive | #800b05maroon | #e71408red |
| Destructive foreground | #fdbdbalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #394dacdarkslateblue | #394dacdarkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.97:1 | AAA |
| Text on card | 19.78:1 | AAA |
| Primary button | 7.44:1 | AAA |
| Secondary button | 6.63:1 | AA |
| Muted text | 5.59:1 | AA |
| Accent | 6.63:1 | AA |
| Destructive | 6.69:1 | AA |
| Text on background | 20.48:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 7.44:1 | AAA |
| Secondary button | 6.63:1 | AA |
| Muted text | 8.66:1 | AAA |
| Accent | 6.63:1 | AA |
| Destructive | 4.65:1 | AA |
Paste this into your globals.css to use Hard in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.138 0.029 271.384);
--muted: oklch(0.969 0.008 97.373);
--muted-foreground: oklch(0.495 0.034 98.037);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.138 0.029 271.384);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.127 0.024 270.757);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.459 0.154 270.628);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.682 0.116 97.865);
--secondary-foreground: oklch(0.177 0.021 98.732);
--accent: oklch(0.682 0.116 97.865);
--accent-foreground: oklch(0.177 0.021 98.732);
--destructive: oklch(0.382 0.149 29.601);
--destructive-foreground: oklch(0.856 0.073 22.146);
--ring: oklch(0.459 0.154 270.628);
--chart-1: oklch(0.459 0.154 270.628);
--chart-2: oklch(0.682 0.116 97.865);
--chart-3: oklch(0.682 0.116 97.865);
--chart-4: oklch(0.715 0.123 97.851);
--chart-5: oklch(0.455 0.163 270.103);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.992 0.001 277.251);
--muted: oklch(0.169 0.012 98.112);
--muted-foreground: oklch(0.751 0.031 97.773);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.992 0.001 277.251);
--card: oklch(0.092 0 180);
--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.459 0.154 270.628);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.682 0.116 97.865);
--secondary-foreground: oklch(0.177 0.021 98.732);
--accent: oklch(0.682 0.116 97.865);
--accent-foreground: oklch(0.177 0.021 98.732);
--destructive: oklch(0.588 0.235 29.509);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.459 0.154 270.628);
--chart-1: oklch(0.459 0.154 270.628);
--chart-2: oklch(0.682 0.116 97.865);
--chart-3: oklch(0.682 0.116 97.865);
--chart-4: oklch(0.715 0.123 97.851);
--chart-5: oklch(0.455 0.163 270.103);
}