Joyful is a shadcn/ui theme built around a muted blue primary color (#52596f) with muted light blue accents (#cdd1df). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#52596f) on a blue-tinted background (#05060a).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #05060ablack |
| Foreground | #010204black | #f8f9fcghostwhite |
| Card | #fcfcfcsnow | #07080eblack |
| Card foreground | #000000black | #fcfcfdwhite |
| Popover | #fcfcfcsnow | #07080eblack |
| Popover foreground | #000000black | #fcfcfdwhite |
| Primary | #52596fdimgray | #52596fdimgray |
| Primary foreground | #f9f9fbghostwhite | #f9f9fbghostwhite |
| Secondary | #e5e6eblavender | #27282adarkslategray |
| Secondary foreground | #454959darkslategray | #bfc0c4silver |
| Muted | #d1d5e6gainsboro | #191e2eblack |
| Muted foreground | #383b47darkslategray | #b8bbc7silver |
| Accent | #cdd1dflightgrey | #353741darkslategray |
| Accent foreground | #30364bdarkslategray | #cfd1d8lightgrey |
| Destructive | #992705saddlebrown | #ed3d07orangered |
| Destructive foreground | #feddd2blanchedalmond | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #52596fdimgray | #52596fdimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.75:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 6.63:1 | AA |
| Secondary button | 7.18:1 | AAA |
| Muted text | 7.63:1 | AAA |
| Accent | 7.86:1 | AAA |
| Destructive | 6.20:1 | AA |
| Text on background | 19.22:1 | AAA |
| Text on card | 19.50:1 | AAA |
| Primary button | 6.63:1 | AA |
| Secondary button | 8.11:1 | AAA |
| Muted text | 8.68:1 | AAA |
| Accent | 7.74:1 | AAA |
| Destructive | 3.97:1 | AA Large |
Paste this into your globals.css to use Joyful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.081 0.014 265.834);
--muted: oklch(0.875 0.024 273.544);
--muted-foreground: oklch(0.356 0.021 273.099);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.466 0.038 272.783);
--primary-foreground: oklch(0.984 0.002 273.846);
--secondary: oklch(0.926 0.006 273.786);
--secondary-foreground: oklch(0.408 0.028 272.986);
--accent: oklch(0.862 0.02 273.593);
--accent-foreground: oklch(0.335 0.038 272.266);
--destructive: oklch(0.454 0.155 35.147);
--destructive-foreground: oklch(0.921 0.039 37.606);
--ring: oklch(0.466 0.038 272.783);
--chart-1: oklch(0.466 0.038 272.783);
--chart-2: oklch(0.926 0.006 273.786);
--chart-3: oklch(0.862 0.02 273.593);
--chart-4: oklch(0.951 0.004 273.814);
--chart-5: oklch(0.461 0.046 272.508);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.123 0.011 269.762);
--foreground: oklch(0.982 0.004 273.824);
--muted: oklch(0.237 0.033 271.835);
--muted-foreground: oklch(0.793 0.017 273.609);
--popover: oklch(0.136 0.013 270.521);
--popover-foreground: oklch(0.991 0.002 273.845);
--card: oklch(0.136 0.013 270.521);
--card-foreground: oklch(0.991 0.002 273.845);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.466 0.038 272.783);
--primary-foreground: oklch(0.984 0.002 273.846);
--secondary: oklch(0.277 0.005 273.664);
--secondary-foreground: oklch(0.809 0.005 273.788);
--accent: oklch(0.339 0.016 273.258);
--accent-foreground: oklch(0.862 0.01 273.738);
--destructive: oklch(0.623 0.219 34.445);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.466 0.038 272.783);
--chart-1: oklch(0.466 0.038 272.783);
--chart-2: oklch(0.277 0.005 273.664);
--chart-3: oklch(0.339 0.016 273.258);
--chart-4: oklch(0.307 0.006 273.655);
--chart-5: oklch(0.461 0.046 272.508);
}