Top-hat is a shadcn/ui theme built around a vivid purple primary color (#f028b1) with vivid red accents (#f0284d). The light mode uses a neutral background (#fcf7fb). Dark mode keeps the vivid purple primary (#f028b1) on a neutral background (#040103).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf7fbsnow | #040103black |
| Foreground | #080206black | #fbf9fasnow |
| Card | #fbf4f9lavenderblush | #080306black |
| Card foreground | #040103black | #fdfcfdwhite |
| Popover | #fcf7fbsnow | #040103black |
| Popover foreground | #080206black | #fbf9fasnow |
| Primary | #f028b1deeppink | #f028b1deeppink |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #cb28f0mediumorchid | #cb28f0mediumorchid |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #eee5f0lavender | #180f1ablack |
| Muted foreground | #67506ddimgray | #aa92afdarkgray |
| Accent | #f0284dcrimson | #f0284dcrimson |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #cf2102firebrick | #e32402orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f028b1deeppink | #f028b1deeppink |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.47:1 | AAA |
| Text on card | 19.14:1 | AAA |
| Primary button | 3.71:1 | AA Large |
| Secondary button | 4.10:1 | AA Large |
| Muted text | 5.81:1 | AA |
| Accent | 4.09:1 | AA Large |
| Destructive | 5.42:1 | AA |
| Text on background | 19.79:1 | AAA |
| Text on card | 20.04:1 | AAA |
| Primary button | 3.71:1 | AA Large |
| Secondary button | 4.10:1 | AA Large |
| Muted text | 6.63:1 | AA |
| Accent | 4.09:1 | AA Large |
| Destructive | 4.63:1 | AA |
Paste this into your globals.css to use Top-hat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.007 336.7);
--foreground: oklch(0.106 0.026 337.105);
--muted: oklch(0.933 0.017 320.008);
--muted-foreground: oklch(0.466 0.053 320.082);
--popover: oklch(0.982 0.007 336.7);
--popover-foreground: oklch(0.106 0.026 337.105);
--card: oklch(0.973 0.011 336.772);
--card-foreground: oklch(0.084 0.021 337.105);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.649 0.255 345.223);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.628 0.281 318.957);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.62 0.229 18.512);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.548 0.209 31.504);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.649 0.255 345.223);
--chart-1: oklch(0.649 0.255 345.223);
--chart-2: oklch(0.628 0.281 318.957);
--chart-3: oklch(0.62 0.229 18.512);
--chart-4: oklch(0.642 0.272 319.298);
--chart-5: oklch(0.654 0.26 345.511);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.086 0.016 336.971);
--foreground: oklch(0.984 0.003 336.624);
--muted: oklch(0.185 0.025 320.091);
--muted-foreground: oklch(0.691 0.048 320.052);
--popover: oklch(0.086 0.016 336.971);
--popover-foreground: oklch(0.984 0.003 336.624);
--card: oklch(0.108 0.02 336.971);
--card-foreground: oklch(0.992 0.002 336.592);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.649 0.255 345.223);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.628 0.281 318.957);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.62 0.229 18.512);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.587 0.225 31.4);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.649 0.255 345.223);
--chart-1: oklch(0.649 0.255 345.223);
--chart-2: oklch(0.628 0.281 318.957);
--chart-3: oklch(0.62 0.229 18.512);
--chart-4: oklch(0.642 0.272 319.298);
--chart-5: oklch(0.654 0.26 345.511);
}