Happy is a shadcn/ui theme built around a neutral gray primary color (#5d6365) with neutral gray accents (#655f5d). The light mode uses a neutral background (#f7fbfd). Dark mode keeps the neutral gray primary (#5d6365) on a cyan-tinted background (#050c0f).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fbfdghostwhite | #050c0fblack |
| Foreground | #04090cblack | #ffffffwhite |
| Card | #f2fafcaliceblue | #070f13black |
| Card foreground | #020608black | #ffffffwhite |
| Popover | #f2fafcaliceblue | #070f13black |
| Popover foreground | #020608black | #ffffffwhite |
| Primary | #5d6365dimgray | #5d6365dimgray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #655f5ddimgray | #655f5ddimgray |
| Secondary foreground | #fafafasnow | #fafafasnow |
| Muted | #f3eeedlinen | #120e0cblack |
| Muted foreground | #535150darkslategray | #afadacdarkgray |
| Accent | #655f5ddimgray | #655f5ddimgray |
| Accent foreground | #fafafasnow | #fafafasnow |
| Destructive | #d34209chocolate | #f65b1eorangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5d6365dimgray | #5d6365dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.24:1 | AAA |
| Text on card | 19.19:1 | AAA |
| Primary button | 6.13:1 | AA |
| Secondary button | 5.99:1 | AA |
| Muted text | 6.87:1 | AA |
| Accent | 5.99:1 | AA |
| Destructive | 4.62:1 | AA |
| Text on background | 19.66:1 | AAA |
| Text on card | 19.29:1 | AAA |
| Primary button | 6.13:1 | AA |
| Secondary button | 5.99:1 | AA |
| Muted text | 8.58:1 | AAA |
| Accent | 5.99:1 | AA |
| Destructive | 6.41:1 | AA |
Paste this into your globals.css to use Happy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.986 0.006 223.188);
--foreground: oklch(0.135 0.013 218.671);
--muted: oklch(0.953 0.005 43.079);
--muted-foreground: oklch(0.436 0.003 43.059);
--popover: oklch(0.979 0.009 223.219);
--popover-foreground: oklch(0.118 0.012 217.966);
--card: oklch(0.979 0.009 223.219);
--card-foreground: oklch(0.118 0.012 217.966);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.494 0.008 223.297);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.491 0.008 42.989);
--secondary-foreground: oklch(0.985 0 43.127);
--accent: oklch(0.491 0.008 42.989);
--accent-foreground: oklch(0.985 0 43.127);
--destructive: oklch(0.582 0.19 37.317);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.494 0.008 223.297);
--chart-1: oklch(0.494 0.008 223.297);
--chart-2: oklch(0.491 0.008 42.989);
--chart-3: oklch(0.491 0.008 42.989);
--chart-4: oklch(0.518 0.008 42.988);
--chart-5: oklch(0.496 0.014 223.438);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.149 0.014 222.002);
--foreground: oklch(1 0 180);
--muted: oklch(0.169 0.008 42.765);
--muted-foreground: oklch(0.748 0.003 43.093);
--popover: oklch(0.163 0.016 223.776);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.163 0.016 223.776);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.494 0.008 223.297);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.491 0.008 42.989);
--secondary-foreground: oklch(0.985 0 43.127);
--accent: oklch(0.491 0.008 42.989);
--accent-foreground: oklch(0.985 0 43.127);
--destructive: oklch(0.669 0.201 38.949);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.494 0.008 223.297);
--chart-1: oklch(0.494 0.008 223.297);
--chart-2: oklch(0.491 0.008 42.989);
--chart-3: oklch(0.491 0.008 42.989);
--chart-4: oklch(0.518 0.008 42.988);
--chart-5: oklch(0.496 0.014 223.438);
}