Joy is a shadcn/ui theme built around a muted yellow primary color (#b7b385) with muted green accents (#a2b785). The light mode uses a neutral background (#fdfcf7). Dark mode keeps the muted yellow primary (#b7b385) on a yellow-tinted background (#0f0e05).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcf7snow | #0f0e05black |
| Foreground | #151404black | #fbfbf8snow |
| Card | #fdfcf7snow | #0f0e05black |
| Card foreground | #151404black | #fbfbf8snow |
| Popover | #fdfcf7snow | #0f0e05black |
| Popover foreground | #151404black | #fbfbf8snow |
| Primary | #b7b385darkkhaki | #b7b385darkkhaki |
| Primary foreground | #060604black | #060604black |
| Secondary | #b79a85rosybrown | #b79a85rosybrown |
| Secondary foreground | #060504black | #060504black |
| Muted | #e9e8e7linen | #181716black |
| Muted foreground | #695d54dimgray | #ab9f96darkgray |
| Accent | #a2b785darkseagreen | #a2b785darkseagreen |
| Accent foreground | #050604black | #050604black |
| Destructive | #5e0808maroon | #ec1313red |
| Destructive foreground | #f7a1a1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b7b385darkkhaki | #b7b385darkkhaki |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.04:1 | AAA |
| Text on card | 18.04:1 | AAA |
| Primary button | 9.47:1 | AAA |
| Secondary button | 7.73:1 | AAA |
| Muted text | 5.20:1 | AA |
| Accent | 9.35:1 | AAA |
| Destructive | 6.96:1 | AA |
| Text on background | 18.64:1 | AAA |
| Text on card | 18.64:1 | AAA |
| Primary button | 9.47:1 | AAA |
| Secondary button | 7.73:1 | AAA |
| Muted text | 6.94:1 | AA |
| Accent | 9.35:1 | AAA |
| Destructive | 4.50:1 | AA |
Paste this into your globals.css to use Joy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.007 102.322);
--foreground: oklch(0.187 0.03 104.529);
--muted: oklch(0.931 0.002 58.333);
--muted-foreground: oklch(0.486 0.021 57.764);
--popover: oklch(0.991 0.007 102.322);
--popover-foreground: oklch(0.187 0.03 104.529);
--card: oklch(0.991 0.007 102.322);
--card-foreground: oklch(0.187 0.03 104.529);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.759 0.063 103.417);
--primary-foreground: oklch(0.122 0.008 103.785);
--secondary: oklch(0.707 0.046 57.432);
--secondary-foreground: oklch(0.116 0.006 62.073);
--accent: oklch(0.751 0.073 126.465);
--accent-foreground: oklch(0.121 0.009 124.653);
--destructive: oklch(0.31 0.118 27.731);
--destructive-foreground: oklch(0.794 0.104 19.622);
--ring: oklch(0.759 0.063 103.417);
--chart-1: oklch(0.759 0.063 103.417);
--chart-2: oklch(0.707 0.046 57.432);
--chart-3: oklch(0.751 0.073 126.465);
--chart-4: oklch(0.731 0.042 57.548);
--chart-5: oklch(0.766 0.069 103.513);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.162 0.019 104.176);
--foreground: oklch(0.988 0.004 102.273);
--muted: oklch(0.205 0.003 58.169);
--muted-foreground: oklch(0.71 0.019 57.993);
--popover: oklch(0.162 0.019 104.176);
--popover-foreground: oklch(0.988 0.004 102.273);
--card: oklch(0.162 0.019 104.176);
--card-foreground: oklch(0.988 0.004 102.273);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.759 0.063 103.417);
--primary-foreground: oklch(0.122 0.008 103.785);
--secondary: oklch(0.707 0.046 57.432);
--secondary-foreground: oklch(0.116 0.006 62.073);
--accent: oklch(0.751 0.073 126.465);
--accent-foreground: oklch(0.121 0.009 124.653);
--destructive: oklch(0.597 0.238 28.618);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.759 0.063 103.417);
--chart-1: oklch(0.759 0.063 103.417);
--chart-2: oklch(0.707 0.046 57.432);
--chart-3: oklch(0.751 0.073 126.465);
--chart-4: oklch(0.731 0.042 57.548);
--chart-5: oklch(0.766 0.069 103.513);
}