Hero is a shadcn/ui theme built around a muted deep purple primary color (#4d314e) with muted deep pink accents (#4e3141). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the muted deep purple primary (#4d314e) on a purple-tinted background (#0f0510).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf8fcsnow | #0f0510black |
| Foreground | #100410black | #f8f6f9whitesmoke |
| Card | #fcf8fcsnow | #0f0510black |
| Card foreground | #100410black | #f8f6f9whitesmoke |
| Popover | #fcf8fcsnow | #0f0510black |
| Popover foreground | #100410black | #f8f6f9whitesmoke |
| Primary | #4d314edarkslategray | #4d314edarkslategray |
| Primary foreground | #e1d0e2gainsboro | #e1d0e2gainsboro |
| Secondary | #3f314edarkslategray | #3f314edarkslategray |
| Secondary foreground | #d8d0e2gainsboro | #d8d0e2gainsboro |
| Muted | #e5ddeelavender | #191122black |
| Muted foreground | #5b5464dimgray | #a39babdarkgray |
| Accent | #4e3141darkslategray | #4e3141darkslategray |
| Accent foreground | #e2d0d9gainsboro | #e2d0d9gainsboro |
| Destructive | #c24100firebrick | #ff6314orangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4d314edarkslategray | #4d314edarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.03:1 | AAA |
| Text on card | 19.03:1 | AAA |
| Primary button | 7.65:1 | AAA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 5.48:1 | AA |
| Accent | 7.73:1 | AAA |
| Destructive | 5.20:1 | AA |
| Text on background | 18.64:1 | AAA |
| Text on card | 18.64:1 | AAA |
| Primary button | 7.65:1 | AAA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 6.85:1 | AA |
| Accent | 7.73:1 | AAA |
| Destructive | 7.03:1 | AAA |
Paste this into your globals.css to use Hero in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.008 324.669);
--foreground: oklch(0.138 0.033 326.097);
--muted: oklch(0.909 0.025 306.777);
--muted-foreground: oklch(0.458 0.028 306.362);
--popover: oklch(0.983 0.008 324.669);
--popover-foreground: oklch(0.138 0.033 326.097);
--card: oklch(0.983 0.008 324.669);
--card-foreground: oklch(0.138 0.033 326.097);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.359 0.062 325.623);
--primary-foreground: oklch(0.876 0.03 324.835);
--secondary: oklch(0.342 0.053 305.166);
--secondary-foreground: oklch(0.869 0.026 306.753);
--accent: oklch(0.354 0.049 346.648);
--accent-foreground: oklch(0.875 0.023 344.095);
--destructive: oklch(0.552 0.175 39.483);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.359 0.062 325.623);
--chart-1: oklch(0.359 0.062 325.623);
--chart-2: oklch(0.342 0.053 305.166);
--chart-3: oklch(0.354 0.049 346.648);
--chart-4: oklch(0.368 0.058 305.122);
--chart-5: oklch(0.359 0.069 325.735);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.138 0.033 326.07);
--foreground: oklch(0.976 0.004 324.645);
--muted: oklch(0.196 0.036 304.795);
--muted-foreground: oklch(0.701 0.025 306.671);
--popover: oklch(0.138 0.033 326.07);
--popover-foreground: oklch(0.976 0.004 324.645);
--card: oklch(0.138 0.033 326.07);
--card-foreground: oklch(0.976 0.004 324.645);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.359 0.062 325.623);
--primary-foreground: oklch(0.876 0.03 324.835);
--secondary: oklch(0.342 0.053 305.166);
--secondary-foreground: oklch(0.869 0.026 306.753);
--accent: oklch(0.354 0.049 346.648);
--accent-foreground: oklch(0.875 0.023 344.095);
--destructive: oklch(0.692 0.205 41.227);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.359 0.062 325.623);
--chart-1: oklch(0.359 0.062 325.623);
--chart-2: oklch(0.342 0.053 305.166);
--chart-3: oklch(0.354 0.049 346.648);
--chart-4: oklch(0.368 0.058 305.122);
--chart-5: oklch(0.359 0.069 325.735);
}