Happiness is a shadcn/ui theme built around a vivid light yellow primary color (#fcfce8) with vivid light purple accents (#fce8fc). The light mode uses a neutral background (#fefefb). Dark mode keeps the vivid light yellow primary (#fcfce8) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fefefbwhite | #000000black |
| Foreground | #111103black | #fcfcf8snow |
| Card | #fefefbwhite | #000000black |
| Card foreground | #111103black | #fcfcf8snow |
| Popover | #fefefbwhite | #000000black |
| Popover foreground | #111103black | #fcfcf8snow |
| Primary | #fcfce8oldlace | #fcfce8oldlace |
| Primary foreground | #444308darkolivegreen | #444308darkolivegreen |
| Secondary | #e8fcfcazure | #e8fcfcazure |
| Secondary foreground | #084443darkslategray | #084443darkslategray |
| Muted | #dee3e3gainsboro | #1c2121black |
| Muted foreground | #464e4edarkslategray | #b1b9b9silver |
| Accent | #fce8fclavenderblush | #fce8fclavenderblush |
| Accent foreground | #430844indigo | #430844indigo |
| Destructive | #5f1407maroon | #db2e0forangered |
| Destructive foreground | #f8ada0lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fcfce8oldlace | #fcfce8oldlace |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.74:1 | AAA |
| Text on card | 18.74:1 | AAA |
| Primary button | 9.86:1 | AAA |
| Secondary button | 10.32:1 | AAA |
| Muted text | 6.58:1 | AA |
| Accent | 13.34:1 | AAA |
| Destructive | 7.20:1 | AAA |
| Text on background | 20.41:1 | AAA |
| Text on card | 20.41:1 | AAA |
| Primary button | 9.86:1 | AAA |
| Secondary button | 10.32:1 | AAA |
| Muted text | 8.12:1 | AAA |
| Accent | 13.34:1 | AAA |
| Destructive | 4.75:1 | AA |
Paste this into your globals.css to use Happiness in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.003 105.671);
--foreground: oklch(0.174 0.029 108.325);
--muted: oklch(0.912 0.006 195.86);
--muted-foreground: oklch(0.416 0.01 195.577);
--popover: oklch(0.995 0.003 105.671);
--popover-foreground: oklch(0.174 0.029 108.325);
--card: oklch(0.995 0.003 105.671);
--card-foreground: oklch(0.174 0.029 108.325);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.986 0.026 106.076);
--primary-foreground: oklch(0.374 0.076 108.537);
--secondary: oklch(0.977 0.021 195.601);
--secondary-foreground: oklch(0.353 0.057 193.126);
--accent: oklch(0.953 0.034 325.345);
--accent-foreground: oklch(0.278 0.115 327.387);
--destructive: oklch(0.322 0.11 32.453);
--destructive-foreground: oklch(0.816 0.091 30.277);
--ring: oklch(0.986 0.026 106.076);
--chart-1: oklch(0.986 0.026 106.076);
--chart-2: oklch(0.977 0.021 195.601);
--chart-3: oklch(0.953 0.034 325.345);
--chart-4: oklch(0.991 0.008 195.824);
--chart-5: oklch(0.987 0.027 106.092);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.989 0.004 105.695);
--muted: oklch(0.244 0.008 195.407);
--muted-foreground: oklch(0.779 0.008 195.789);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.989 0.004 105.695);
--card: oklch(0 0 0);
--card-foreground: oklch(0.989 0.004 105.695);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.986 0.026 106.076);
--primary-foreground: oklch(0.374 0.076 108.537);
--secondary: oklch(0.977 0.021 195.601);
--secondary-foreground: oklch(0.353 0.057 193.126);
--accent: oklch(0.953 0.034 325.345);
--accent-foreground: oklch(0.278 0.115 327.387);
--destructive: oklch(0.58 0.212 31.925);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.986 0.026 106.076);
--chart-1: oklch(0.986 0.026 106.076);
--chart-2: oklch(0.977 0.021 195.601);
--chart-3: oklch(0.953 0.034 325.345);
--chart-4: oklch(0.991 0.008 195.824);
--chart-5: oklch(0.987 0.027 106.092);
}