Happiness is a shadcn/ui theme built around a muted light blue primary color (#c2c9d0) with muted light green accents (#c9d0c2). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light blue primary (#c2c9d0) on a neutral background (#010204).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #010204black |
| Foreground | #030a11black | #ffffffwhite |
| Card | #fcfcfcsnow | #020508black |
| Card foreground | #02070dblack | #ffffffwhite |
| Popover | #ffffffwhite | #010204black |
| Popover foreground | #030a11black | #ffffffwhite |
| Primary | #c2c9d0silver | #c2c9d0silver |
| Primary foreground | #2a3037darkslategray | #2a3037darkslategray |
| Secondary | #d0c2c9thistle | #d0c2c9thistle |
| Secondary foreground | #372a30darkslategray | #372a30darkslategray |
| Muted | #e5cdd8gainsboro | #321a25black |
| Muted foreground | #57424cdarkslategray | #bda8b2darkgray |
| Accent | #c9d0c2silver | #c9d0c2silver |
| Accent foreground | #30372adarkslategray | #30372adarkslategray |
| Destructive | #6a1e0bmaroon | #d43c16firebrick |
| Destructive foreground | #f7bfb1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c2c9d0silver | #c2c9d0silver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.89:1 | AAA |
| Text on card | 19.78:1 | AAA |
| Primary button | 7.97:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 6.13:1 | AA |
| Accent | 7.81:1 | AAA |
| Destructive | 7.21:1 | AAA |
| Text on background | 20.71:1 | AAA |
| Text on card | 20.43:1 | AAA |
| Primary button | 7.97:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 7.15:1 | AAA |
| Accent | 7.81:1 | AAA |
| Destructive | 4.69:1 | AA |
Paste this into your globals.css to use Happiness in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.139 0.022 245.448);
--muted: oklch(0.871 0.03 347.82);
--muted-foreground: oklch(0.405 0.033 349.012);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.139 0.022 245.448);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.126 0.019 242.138);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.833 0.013 251.57);
--primary-foreground: oklch(0.306 0.015 251.801);
--secondary: oklch(0.829 0.018 347.481);
--secondary-foreground: oklch(0.302 0.021 348.7);
--accent: oklch(0.849 0.021 130.029);
--accent-foreground: oklch(0.325 0.024 130.537);
--destructive: oklch(0.356 0.112 34.743);
--destructive-foreground: oklch(0.85 0.068 34.433);
--ring: oklch(0.833 0.013 251.57);
--chart-1: oklch(0.833 0.013 251.57);
--chart-2: oklch(0.829 0.018 347.481);
--chart-3: oklch(0.849 0.021 130.029);
--chart-4: oklch(0.854 0.015 347.382);
--chart-5: oklch(0.832 0.016 251.597);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.088 0.01 243.514);
--foreground: oklch(1 0 180);
--muted: oklch(0.256 0.041 350.969);
--muted-foreground: oklch(0.752 0.028 347.895);
--popover: oklch(0.088 0.01 243.514);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.111 0.012 243.514);
--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.833 0.013 251.57);
--primary-foreground: oklch(0.306 0.015 251.801);
--secondary: oklch(0.829 0.018 347.481);
--secondary-foreground: oklch(0.302 0.021 348.7);
--accent: oklch(0.849 0.021 130.029);
--accent-foreground: oklch(0.325 0.024 130.537);
--destructive: oklch(0.58 0.195 34.258);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.833 0.013 251.57);
--chart-1: oklch(0.833 0.013 251.57);
--chart-2: oklch(0.829 0.018 347.481);
--chart-3: oklch(0.849 0.021 130.029);
--chart-4: oklch(0.854 0.015 347.382);
--chart-5: oklch(0.832 0.016 251.597);
}