Playful is a shadcn/ui theme built around a teal primary color (#1a8e60) with cyan accents (#1a838e). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the teal primary (#1a8e60) on a teal-tinted background (#04100b).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdfdwhite | #04100bblack |
| Foreground | #000000black | #f8fcfamintcream |
| Card | #f8fbfamintcream | #05140eblack |
| Card foreground | #000000black | #fcfdfdwhite |
| Popover | #fcfdfdwhite | #04100bblack |
| Popover foreground | #000000black | #f8fcfamintcream |
| Primary | #1a8e60seagreen | #1a8e60seagreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #1a8e26forestgreen | #1a8e26forestgreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #cde4d0lightgrey | #1b321ddarkslategray |
| Muted foreground | #5d5f5edimgray | #a0a2a0darkgray |
| Accent | #1a838edarkcyan | #1a838edarkcyan |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #73300csaddlebrown | #d45916chocolate |
| Destructive foreground | #f8cfbapeachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1a8e60seagreen | #1a8e60seagreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.62:1 | AAA |
| Text on card | 20.24:1 | AAA |
| Primary button | 4.12:1 | AA Large |
| Secondary button | 4.23:1 | AA Large |
| Muted text | 4.78:1 | AA |
| Accent | 4.50:1 | AA |
| Destructive | 6.75:1 | AA |
| Text on background | 18.70:1 | AAA |
| Text on card | 18.50:1 | AAA |
| Primary button | 4.12:1 | AA Large |
| Secondary button | 4.23:1 | AA Large |
| Muted text | 5.39:1 | AA |
| Accent | 4.50:1 | AA |
| Destructive | 4.00:1 | AA Large |
Paste this into your globals.css to use Playful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.002 170.57);
--foreground: oklch(0 0 0);
--muted: oklch(0.897 0.037 148.123);
--muted-foreground: oklch(0.484 0.004 148.511);
--popover: oklch(0.993 0.002 170.57);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.987 0.004 170.515);
--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.575 0.122 160.358);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.566 0.172 143.957);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.559 0.09 206.539);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.398 0.105 44.551);
--destructive-foreground: oklch(0.885 0.054 49.933);
--ring: oklch(0.575 0.122 160.358);
--chart-1: oklch(0.575 0.122 160.358);
--chart-2: oklch(0.566 0.172 143.957);
--chart-3: oklch(0.559 0.09 206.539);
--chart-4: oklch(0.603 0.184 143.921);
--chart-5: oklch(0.581 0.125 159.952);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.159 0.021 168.225);
--foreground: oklch(0.987 0.004 170.501);
--muted: oklch(0.29 0.047 146.555);
--muted-foreground: oklch(0.709 0.003 148.542);
--popover: oklch(0.159 0.021 168.225);
--popover-foreground: oklch(0.987 0.004 170.501);
--card: oklch(0.175 0.025 166.675);
--card-foreground: oklch(0.994 0.002 170.563);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.575 0.122 160.358);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.566 0.172 143.957);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.559 0.09 206.539);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.614 0.171 43.427);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.575 0.122 160.358);
--chart-1: oklch(0.575 0.122 160.358);
--chart-2: oklch(0.566 0.172 143.957);
--chart-3: oklch(0.559 0.09 206.539);
--chart-4: oklch(0.603 0.184 143.921);
--chart-5: oklch(0.581 0.125 159.952);
}