Hacker is a shadcn/ui theme built around a neutral gray primary color (#bababa) with neutral gray accents (#2e332e). The light mode uses a neutral background (#0a0b0a). Dark mode keeps the neutral gray primary (#bababa) on a neutral background (#0a0b0a).
| Token | Light | Dark |
|---|---|---|
| Background | #0a0b0ablack | #0a0b0ablack |
| Foreground | #bababasilver | #bababasilver |
| Card | #050505black | #050505black |
| Card foreground | #c7c7c7silver | #c7c7c7silver |
| Popover | #020302black | #020302black |
| Popover foreground | #d4d4d4lightgrey | #d4d4d4lightgrey |
| Primary | #bababasilver | #bababasilver |
| Primary foreground | #212121black | #212121black |
| Secondary | #404040darkslategray | #404040darkslategray |
| Secondary foreground | #d9d9d9gainsboro | #d9d9d9gainsboro |
| Muted | #222b22darkslategray | #222b22darkslategray |
| Muted foreground | #9bb09bdarkseagreen | #9bb09bdarkseagreen |
| Accent | #2e332edarkslategray | #2e332edarkslategray |
| Accent foreground | #c7ccc7silver | #c7ccc7silver |
| Destructive | #f50800red | #f50800red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #171717black | #171717black |
| Input | #1f1f1fblack | #1f1f1fblack |
| Ring | #bababasilver | #bababasilver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 10.17:1 | AAA |
| Text on card | 12.04:1 | AAA |
| Primary button | 8.31:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.33:1 | AA |
| Accent | 7.92:1 | AAA |
| Destructive | 4.27:1 | AA Large |
| Text on background | 10.17:1 | AAA |
| Text on card | 12.04:1 | AAA |
| Primary button | 8.31:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.33:1 | AA |
| Accent | 7.92:1 | AAA |
| Destructive | 4.27:1 | AA Large |
Paste this into your globals.css to use Hacker in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.147 0.003 145.433);
--foreground: oklch(0.789 0 171.254);
--muted: oklch(0.276 0.021 144.979);
--muted-foreground: oklch(0.736 0.039 145.17);
--popover: oklch(0.092 0.002 145.434);
--popover-foreground: oklch(0.869 0 165.964);
--card: oklch(0.116 0.002 145.434);
--card-foreground: oklch(0.829 0 180);
--border: oklch(0.204 0 180);
--input: oklch(0.238 0 161.565);
--primary: oklch(0.789 0 171.254);
--primary-foreground: oklch(0.248 0 173.29);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.314 0.011 145.312);
--accent-foreground: oklch(0.84 0.009 145.492);
--destructive: oklch(0.61 0.248 29.506);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.789 0 171.254);
--chart-1: oklch(0.789 0 171.254);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.314 0.011 145.312);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(0.786 0.005 17.256);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.147 0.003 145.433);
--foreground: oklch(0.789 0 171.254);
--muted: oklch(0.276 0.021 144.979);
--muted-foreground: oklch(0.736 0.039 145.17);
--popover: oklch(0.092 0.002 145.434);
--popover-foreground: oklch(0.869 0 165.964);
--card: oklch(0.116 0.002 145.434);
--card-foreground: oklch(0.829 0 180);
--border: oklch(0.204 0 180);
--input: oklch(0.238 0 161.565);
--primary: oklch(0.789 0 171.254);
--primary-foreground: oklch(0.248 0 173.29);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.314 0.011 145.312);
--accent-foreground: oklch(0.84 0.009 145.492);
--destructive: oklch(0.61 0.248 29.506);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.789 0 171.254);
--chart-1: oklch(0.789 0 171.254);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.314 0.011 145.312);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(0.786 0.005 17.256);
}