Joyful is a shadcn/ui theme built around a muted indigo primary color (#4d4568) with muted light indigo accents (#dad8e4). The light mode uses a neutral background (#f9f8fb). Dark mode keeps the muted indigo primary (#4d4568) on a neutral background (#040307).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f8fbghostwhite | #040307black |
| Foreground | #070510black | #fcfcfdwhite |
| Card | #f9f8fbghostwhite | #040307black |
| Card foreground | #070510black | #fcfcfdwhite |
| Popover | #f9f8fbghostwhite | #040307black |
| Popover foreground | #070510black | #fcfcfdwhite |
| Primary | #4d4568darkslateblue | #4d4568darkslateblue |
| Primary foreground | #eeedf3whitesmoke | #eeedf3whitesmoke |
| Secondary | #dad8e4gainsboro | #292537darkslategray |
| Secondary foreground | #3e3852darkslategray | #c1bcd2silver |
| Muted | #e1dee7gainsboro | #1a1821black |
| Muted foreground | #48474ddarkslategray | #b3b2b8darkgray |
| Accent | #dad8e4gainsboro | #292537darkslategray |
| Accent foreground | #3e3852darkslategray | #c1bcd2silver |
| Destructive | #89180bdarkred | #ed311dorangered |
| Destructive foreground | #fbd0cbpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4d4568darkslateblue | #4d4568darkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.16:1 | AAA |
| Text on card | 19.16:1 | AAA |
| Primary button | 7.58:1 | AAA |
| Secondary button | 7.87:1 | AAA |
| Muted text | 6.93:1 | AA |
| Accent | 7.87:1 | AAA |
| Destructive | 6.83:1 | AA |
| Text on background | 20.03:1 | AAA |
| Text on card | 20.03:1 | AAA |
| Primary button | 7.58:1 | AAA |
| Secondary button | 8.04:1 | AAA |
| Muted text | 8.37:1 | AAA |
| Accent | 8.04:1 | AAA |
| Destructive | 4.15:1 | AA Large |
Paste this into your globals.css to use Joyful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.004 297.001);
--foreground: oklch(0.126 0.027 295.464);
--muted: oklch(0.906 0.012 296.835);
--muted-foreground: oklch(0.401 0.01 296.632);
--popover: oklch(0.982 0.004 297.001);
--popover-foreground: oklch(0.126 0.027 295.464);
--card: oklch(0.982 0.004 297.001);
--card-foreground: oklch(0.126 0.027 295.464);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.415 0.058 294.459);
--primary-foreground: oklch(0.948 0.008 296.922);
--secondary: oklch(0.887 0.017 296.726);
--secondary-foreground: oklch(0.357 0.045 294.712);
--accent: oklch(0.887 0.017 296.726);
--accent-foreground: oklch(0.357 0.045 294.712);
--destructive: oklch(0.408 0.15 30.513);
--destructive-foreground: oklch(0.893 0.049 25.533);
--ring: oklch(0.415 0.058 294.459);
--chart-1: oklch(0.415 0.058 294.459);
--chart-2: oklch(0.887 0.017 296.726);
--chart-3: oklch(0.887 0.017 296.726);
--chart-4: oklch(0.913 0.013 296.818);
--chart-5: oklch(0.409 0.066 293.983);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.105 0.014 296.761);
--foreground: oklch(0.992 0.001 297.066);
--muted: oklch(0.214 0.018 295.56);
--muted-foreground: oklch(0.767 0.008 296.881);
--popover: oklch(0.105 0.014 296.761);
--popover-foreground: oklch(0.992 0.001 297.066);
--card: oklch(0.105 0.014 296.761);
--card-foreground: oklch(0.992 0.001 297.066);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.415 0.058 294.459);
--primary-foreground: oklch(0.948 0.008 296.922);
--secondary: oklch(0.278 0.032 294.924);
--secondary-foreground: oklch(0.807 0.03 296.404);
--accent: oklch(0.278 0.032 294.924);
--accent-foreground: oklch(0.807 0.03 296.404);
--destructive: oklch(0.614 0.224 30.508);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.415 0.058 294.459);
--chart-1: oklch(0.415 0.058 294.459);
--chart-2: oklch(0.278 0.032 294.924);
--chart-3: oklch(0.278 0.032 294.924);
--chart-4: oklch(0.305 0.037 294.838);
--chart-5: oklch(0.409 0.066 293.983);
}