Happy-go-lucky is a shadcn/ui theme built around a purple primary color (#ae42b8) with muted light purple accents (#d5ccd6). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the purple primary (#ae42b8) on a purple-tinted background (#0e060f).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfdwhite | #0e060fblack |
| Foreground | #0b040cblack | #f8f6f8whitesmoke |
| Card | #fdfcfdwhite | #0e060fblack |
| Card foreground | #0b040cblack | #f8f6f8whitesmoke |
| Popover | #fdfcfdwhite | #0e060fblack |
| Popover foreground | #0b040cblack | #f8f6f8whitesmoke |
| Primary | #ae42b8darkorchid | #ae42b8darkorchid |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #d5ccd6lightgrey | #1d1a1eblack |
| Secondary foreground | #3d323edarkslategray | #b9b1b9silver |
| Muted | #e8d7eagainsboro | #271528black |
| Muted foreground | #626062dimgray | #9f9d9fdarkgray |
| Accent | #d5ccd6lightgrey | #1d1a1eblack |
| Accent foreground | #3d323edarkslategray | #b9b1b9silver |
| Destructive | #b8440ffirebrick | #ef763ecoral |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ae42b8darkorchid | #ae42b8darkorchid |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.74:1 | AAA |
| Text on card | 19.74:1 | AAA |
| Primary button | 4.91:1 | AA |
| Secondary button | 7.80:1 | AAA |
| Muted text | 4.55:1 | AA |
| Accent | 7.80:1 | AAA |
| Destructive | 5.40:1 | AA |
| Text on background | 18.59:1 | AAA |
| Text on card | 18.59:1 | AAA |
| Primary button | 4.91:1 | AA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 6.37:1 | AA |
| Accent | 8.21:1 | AAA |
| Destructive | 7.33:1 | AAA |
Paste this into your globals.css to use Happy-go-lucky in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 323.149);
--foreground: oklch(0.124 0.026 324.557);
--muted: oklch(0.899 0.032 323.295);
--muted-foreground: oklch(0.491 0.004 323.17);
--popover: oklch(0.991 0.003 323.149);
--popover-foreground: oklch(0.124 0.026 324.557);
--card: oklch(0.991 0.003 323.149);
--card-foreground: oklch(0.124 0.026 324.557);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.572 0.198 324.304);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.856 0.017 323.226);
--secondary-foreground: oklch(0.334 0.026 323.485);
--accent: oklch(0.856 0.017 323.226);
--accent-foreground: oklch(0.334 0.026 323.485);
--destructive: oklch(0.541 0.16 40.6);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.572 0.198 324.304);
--chart-1: oklch(0.572 0.198 324.304);
--chart-2: oklch(0.856 0.017 323.226);
--chart-3: oklch(0.856 0.017 323.226);
--chart-4: oklch(0.88 0.014 323.208);
--chart-5: oklch(0.575 0.208 324.317);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.025 324.088);
--foreground: oklch(0.976 0.003 323.149);
--muted: oklch(0.229 0.044 323.918);
--muted-foreground: oklch(0.699 0.003 323.157);
--popover: oklch(0.139 0.025 324.088);
--popover-foreground: oklch(0.976 0.003 323.149);
--card: oklch(0.139 0.025 324.088);
--card-foreground: oklch(0.976 0.003 323.149);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.572 0.198 324.304);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.224 0.008 323.296);
--secondary-foreground: oklch(0.769 0.015 323.226);
--accent: oklch(0.224 0.008 323.296);
--accent-foreground: oklch(0.769 0.015 323.226);
--destructive: oklch(0.698 0.165 43.654);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.572 0.198 324.304);
--chart-1: oklch(0.572 0.198 324.304);
--chart-2: oklch(0.224 0.008 323.296);
--chart-3: oklch(0.224 0.008 323.296);
--chart-4: oklch(0.256 0.01 323.308);
--chart-5: oklch(0.575 0.208 324.317);
}