Hard is a shadcn/ui theme built around a vivid deep indigo primary color (#01037f) with vivid deep yellow accents (#7f7d01). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the vivid deep indigo primary (#01037f) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfbfeghostwhite | #000000black |
| Foreground | #000000black | #f9f9fbghostwhite |
| Card | #fbfbfeghostwhite | #000000black |
| Card foreground | #000000black | #f9f9fbghostwhite |
| Popover | #fbfbfeghostwhite | #000000black |
| Popover foreground | #000000black | #f9f9fbghostwhite |
| Primary | #01037fnavy | #01037fnavy |
| Primary foreground | #b3b4fflightsteelblue | #b3b4fflightsteelblue |
| Secondary | #7f7d01olive | #7f7d01olive |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e5e5d7gainsboro | #28281ablack |
| Muted foreground | #504f49darkslategray | #b6b5afdarkgray |
| Accent | #7f7d01olive | #7f7d01olive |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #a22807firebrick | #f7643btomato |
| Destructive foreground | #fee4ddmistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #01037fnavy | #01037fnavy |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.36:1 | AAA |
| Text on card | 20.36:1 | AAA |
| Primary button | 8.25:1 | AAA |
| Secondary button | 4.35:1 | AA Large |
| Muted text | 6.44:1 | AA |
| Accent | 4.35:1 | AA Large |
| Destructive | 6.11:1 | AA |
| Text on background | 19.97:1 | AAA |
| Text on card | 19.97:1 | AAA |
| Primary button | 8.25:1 | AAA |
| Secondary button | 4.35:1 | AA Large |
| Muted text | 7.25:1 | AAA |
| Accent | 4.35:1 | AA Large |
| Destructive | 6.82:1 | AA |
Paste this into your globals.css to use Hard in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.003 285.558);
--foreground: oklch(0 0 0);
--muted: oklch(0.917 0.018 105.967);
--muted-foreground: oklch(0.427 0.01 106.015);
--popover: oklch(0.989 0.003 285.558);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.989 0.003 285.558);
--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.272 0.185 264.309);
--primary-foreground: oklch(0.797 0.105 282.995);
--secondary: oklch(0.572 0.124 108.562);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.572 0.124 108.562);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.47 0.162 34.424);
--destructive-foreground: oklch(0.937 0.03 35.946);
--ring: oklch(0.272 0.185 264.309);
--chart-1: oklch(0.272 0.185 264.309);
--chart-2: oklch(0.572 0.124 108.562);
--chart-3: oklch(0.572 0.124 108.562);
--chart-4: oklch(0.621 0.134 108.549);
--chart-5: oklch(0.273 0.189 263.689);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.982 0.003 285.569);
--muted: oklch(0.272 0.024 107.07);
--muted-foreground: oklch(0.773 0.008 105.809);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.982 0.003 285.569);
--card: oklch(0 0 0);
--card-foreground: oklch(0.982 0.003 285.569);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.272 0.185 264.309);
--primary-foreground: oklch(0.797 0.105 282.995);
--secondary: oklch(0.572 0.124 108.562);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.572 0.124 108.562);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.684 0.189 36.149);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.272 0.185 264.309);
--chart-1: oklch(0.272 0.185 264.309);
--chart-2: oklch(0.572 0.124 108.562);
--chart-3: oklch(0.572 0.124 108.562);
--chart-4: oklch(0.621 0.134 108.549);
--chart-5: oklch(0.273 0.189 263.689);
}