Joyful is a shadcn/ui theme built around a muted deep green primary color (#3a4b3a) with muted deep teal accents (#3a4b42). The light mode uses a neutral background (#f7fdf7). Dark mode keeps the muted deep green primary (#3a4b3a) on a neutral background (#020302).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fdf7mintcream | #020302black |
| Foreground | #000000black | #f5f9f5whitesmoke |
| Card | #f3fcf3honeydew | #040704black |
| Card foreground | #000000black | #f9fbf9mintcream |
| Popover | #f7fdf7mintcream | #020302black |
| Popover foreground | #000000black | #f5f9f5whitesmoke |
| Primary | #3a4b3adarkslategray | #3a4b3adarkslategray |
| Primary foreground | #d7e0d7gainsboro | #d7e0d7gainsboro |
| Secondary | #424b3adarkslategray | #424b3adarkslategray |
| Secondary foreground | #dbe0d7gainsboro | #dbe0d7gainsboro |
| Muted | #e0e9d8gainsboro | #1f2716black |
| Muted foreground | #525b48darkolivegreen | #adb7a4darkgray |
| Accent | #3a4b42darkslategray | #3a4b42darkslategray |
| Accent foreground | #d7e0dbgainsboro | #d7e0dbgainsboro |
| Destructive | #a33c05saddlebrown | #e95607orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3a4b3adarkslategray | #3a4b3adarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.33:1 | AAA |
| Text on card | 20.01:1 | AAA |
| Primary button | 6.92:1 | AA |
| Secondary button | 6.81:1 | AA |
| Muted text | 5.69:1 | AA |
| Accent | 6.88:1 | AA |
| Destructive | 6.52:1 | AA |
| Text on background | 19.41:1 | AAA |
| Text on card | 19.51:1 | AAA |
| Primary button | 6.92:1 | AA |
| Secondary button | 6.81:1 | AA |
| Muted text | 7.43:1 | AAA |
| Accent | 6.88:1 | AA |
| Destructive | 3.63:1 | AA Large |
Paste this into your globals.css to use Joyful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.01 145.496);
--foreground: oklch(0 0 0);
--muted: oklch(0.922 0.024 128.75);
--muted-foreground: oklch(0.458 0.033 129.302);
--popover: oklch(0.988 0.01 145.496);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.982 0.016 145.454);
--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.392 0.036 144.849);
--primary-foreground: oklch(0.897 0.016 145.441);
--secondary: oklch(0.399 0.03 129.341);
--secondary-foreground: oklch(0.9 0.013 128.628);
--accent: oklch(0.395 0.026 163.264);
--accent-foreground: oklch(0.898 0.012 164.796);
--destructive: oklch(0.496 0.147 41.847);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.392 0.036 144.849);
--chart-1: oklch(0.392 0.036 144.849);
--chart-2: oklch(0.399 0.03 129.341);
--chart-3: oklch(0.395 0.026 163.264);
--chart-4: oklch(0.43 0.033 129.357);
--chart-5: oklch(0.396 0.044 144.686);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.095 0.011 144.681);
--foreground: oklch(0.979 0.006 145.526);
--muted: oklch(0.259 0.032 129.963);
--muted-foreground: oklch(0.767 0.029 128.895);
--popover: oklch(0.095 0.011 144.681);
--popover-foreground: oklch(0.979 0.006 145.526);
--card: oklch(0.119 0.013 144.681);
--card-foreground: oklch(0.986 0.004 145.543);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.392 0.036 144.849);
--primary-foreground: oklch(0.897 0.016 145.441);
--secondary: oklch(0.399 0.03 129.341);
--secondary-foreground: oklch(0.9 0.013 128.628);
--accent: oklch(0.395 0.026 163.264);
--accent-foreground: oklch(0.898 0.012 164.796);
--destructive: oklch(0.641 0.195 41.004);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.392 0.036 144.849);
--chart-1: oklch(0.392 0.036 144.849);
--chart-2: oklch(0.399 0.03 129.341);
--chart-3: oklch(0.395 0.026 163.264);
--chart-4: oklch(0.43 0.033 129.357);
--chart-5: oklch(0.396 0.044 144.686);
}