Hack The Box is a shadcn/ui theme built around a muted blue primary color (#a3b0cc) with deep blue accents (#2b3f5e). The light mode uses a blue-tinted background (#131c2a). Dark mode keeps the muted blue primary (#a3b0cc) on a blue-tinted background (#131c2a).
| Token | Light | Dark |
|---|---|---|
| Background | #131c2ablack | #131c2ablack |
| Foreground | #a3b0cclightsteelblue | #a3b0cclightsteelblue |
| Card | #101723black | #101723black |
| Card foreground | #b3bed5lightsteelblue | #b3bed5lightsteelblue |
| Popover | #0e151fblack | #0e151fblack |
| Popover foreground | #c4ccdelightgrey | #c4ccdelightgrey |
| Primary | #a3b0cclightsteelblue | #a3b0cclightsteelblue |
| Primary foreground | #161b27black | #161b27black |
| Secondary | #343b4cdarkslategray | #343b4cdarkslategray |
| Secondary foreground | #d1d6e0gainsboro | #d1d6e0gainsboro |
| Muted | #24282edarkslategray | #24282edarkslategray |
| Muted foreground | #9ea6b3darkgray | #9ea6b3darkgray |
| Accent | #2b3f5edarkslategray | #2b3f5edarkslategray |
| Accent foreground | #d2dbeagainsboro | #d2dbeagainsboro |
| Destructive | #eb5e42tomato | #eb5e42tomato |
| Destructive foreground | #000000black | #000000black |
| Border | #202937darkslategray | #202937darkslategray |
| Input | #253041darkslategray | #253041darkslategray |
| Ring | #a3b0cclightsteelblue | #a3b0cclightsteelblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 7.85:1 | AAA |
| Text on card | 9.59:1 | AAA |
| Primary button | 7.90:1 | AAA |
| Secondary button | 7.66:1 | AAA |
| Muted text | 6.05:1 | AA |
| Accent | 7.62:1 | AAA |
| Destructive | 6.21:1 | AA |
| Text on background | 7.85:1 | AAA |
| Text on card | 9.59:1 | AAA |
| Primary button | 7.90:1 | AAA |
| Secondary button | 7.66:1 | AAA |
| Muted text | 6.05:1 | AA |
| Accent | 7.62:1 | AAA |
| Destructive | 6.21:1 | AA |
Paste this into your globals.css to use Hack The Box in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.225 0.03 259.69);
--foreground: oklch(0.756 0.043 265.652);
--muted: oklch(0.274 0.012 259.925);
--muted-foreground: oklch(0.722 0.021 259.943);
--popover: oklch(0.194 0.024 259.731);
--popover-foreground: oklch(0.845 0.027 265.834);
--card: oklch(0.205 0.026 259.716);
--card-foreground: oklch(0.801 0.035 265.753);
--border: oklch(0.278 0.03 259.775);
--input: oklch(0.306 0.034 259.762);
--primary: oklch(0.756 0.043 265.652);
--primary-foreground: oklch(0.224 0.025 265.16);
--secondary: oklch(0.353 0.031 265.402);
--secondary-foreground: oklch(0.876 0.015 265.926);
--accent: oklch(0.366 0.06 259.604);
--accent-foreground: oklch(0.889 0.023 259.944);
--destructive: oklch(0.659 0.181 33.142);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.756 0.043 265.652);
--chart-1: oklch(0.756 0.043 265.652);
--chart-2: oklch(0.353 0.031 265.402);
--chart-3: oklch(0.366 0.06 259.604);
--chart-4: oklch(0.381 0.034 265.385);
--chart-5: oklch(0.754 0.048 265.602);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.225 0.03 259.69);
--foreground: oklch(0.756 0.043 265.652);
--muted: oklch(0.274 0.012 259.925);
--muted-foreground: oklch(0.722 0.021 259.943);
--popover: oklch(0.194 0.024 259.731);
--popover-foreground: oklch(0.845 0.027 265.834);
--card: oklch(0.205 0.026 259.716);
--card-foreground: oklch(0.801 0.035 265.753);
--border: oklch(0.278 0.03 259.775);
--input: oklch(0.306 0.034 259.762);
--primary: oklch(0.756 0.043 265.652);
--primary-foreground: oklch(0.224 0.025 265.16);
--secondary: oklch(0.353 0.031 265.402);
--secondary-foreground: oklch(0.876 0.015 265.926);
--accent: oklch(0.366 0.06 259.604);
--accent-foreground: oklch(0.889 0.023 259.944);
--destructive: oklch(0.659 0.181 33.142);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.756 0.043 265.652);
--chart-1: oklch(0.756 0.043 265.652);
--chart-2: oklch(0.353 0.031 265.402);
--chart-3: oklch(0.366 0.06 259.604);
--chart-4: oklch(0.381 0.034 265.385);
--chart-5: oklch(0.754 0.048 265.602);
}