Tokyo Hack is a shadcn/ui theme built around a vivid purple primary color (#f08ef0) with indigo accents (#2f2c77). The light mode uses an indigo-tinted background (#19173f). Dark mode keeps the vivid purple primary (#f08ef0) on an indigo-tinted background (#19173f).
| Token | Light | Dark |
|---|---|---|
| Background | #19173fmidnightblue | #19173fmidnightblue |
| Foreground | #ffffffwhite | #ffffffwhite |
| Card | #161538midnightblue | #161538midnightblue |
| Card foreground | #ffffffwhite | #ffffffwhite |
| Popover | #141334black | #141334black |
| Popover foreground | #ffffffwhite | #ffffffwhite |
| Primary | #f08ef0violet | #f08ef0violet |
| Primary foreground | #440944indigo | #440944indigo |
| Secondary | #532d53darkslategray | #532d53darkslategray |
| Secondary foreground | #e4cde4gainsboro | #e4cde4gainsboro |
| Muted | #302f3cdarkslategray | #302f3cdarkslategray |
| Muted foreground | #adacbedarkgray | #adacbedarkgray |
| Accent | #2f2c77midnightblue | #2f2c77midnightblue |
| Accent foreground | #e2e1f4lavender | #e2e1f4lavender |
| Destructive | #e0190bred | #e0190bred |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #25244cmidnightblue | #25244cmidnightblue |
| Input | #2a2957midnightblue | #2a2957midnightblue |
| Ring | #f08ef0violet | #f08ef0violet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 16.95:1 | AAA |
| Text on card | 17.56:1 | AAA |
| Primary button | 7.20:1 | AAA |
| Secondary button | 7.60:1 | AAA |
| Muted text | 5.89:1 | AA |
| Accent | 9.33:1 | AAA |
| Destructive | 4.86:1 | AA |
| Text on background | 16.95:1 | AAA |
| Text on card | 17.56:1 | AAA |
| Primary button | 7.20:1 | AAA |
| Secondary button | 7.60:1 | AAA |
| Muted text | 5.89:1 | AA |
| Accent | 9.33:1 | AAA |
| Destructive | 4.86:1 | AA |
Paste this into your globals.css to use Tokyo Hack in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.234 0.074 280.546);
--foreground: oklch(1 0 180);
--muted: oklch(0.312 0.023 286.518);
--muted-foreground: oklch(0.751 0.025 287.306);
--popover: oklch(0.211 0.063 281.071);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.219 0.066 280.881);
--card-foreground: oklch(1 0 180);
--border: oklch(0.285 0.072 282.28);
--input: oklch(0.308 0.08 282.085);
--primary: oklch(0.783 0.17 327.045);
--primary-foreground: oklch(0.278 0.114 328.113);
--secondary: oklch(0.36 0.08 327.079);
--secondary-foreground: oklch(0.875 0.04 325.912);
--accent: oklch(0.344 0.124 279.106);
--accent-foreground: oklch(0.916 0.025 287.42);
--destructive: oklch(0.576 0.227 29.757);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.783 0.17 327.045);
--chart-1: oklch(0.783 0.17 327.045);
--chart-2: oklch(0.36 0.08 327.079);
--chart-3: oklch(0.344 0.124 279.106);
--chart-4: oklch(0.388 0.088 327.103);
--chart-5: oklch(0.783 0.176 327.092);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.234 0.074 280.546);
--foreground: oklch(1 0 180);
--muted: oklch(0.312 0.023 286.518);
--muted-foreground: oklch(0.751 0.025 287.306);
--popover: oklch(0.211 0.063 281.071);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.219 0.066 280.881);
--card-foreground: oklch(1 0 180);
--border: oklch(0.285 0.072 282.28);
--input: oklch(0.308 0.08 282.085);
--primary: oklch(0.783 0.17 327.045);
--primary-foreground: oklch(0.278 0.114 328.113);
--secondary: oklch(0.36 0.08 327.079);
--secondary-foreground: oklch(0.875 0.04 325.912);
--accent: oklch(0.344 0.124 279.106);
--accent-foreground: oklch(0.916 0.025 287.42);
--destructive: oklch(0.576 0.227 29.757);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.783 0.17 327.045);
--chart-1: oklch(0.783 0.17 327.045);
--chart-2: oklch(0.36 0.08 327.079);
--chart-3: oklch(0.344 0.124 279.106);
--chart-4: oklch(0.388 0.088 327.103);
--chart-5: oklch(0.783 0.176 327.092);
}