Cartoon is a shadcn/ui theme built around a deep violet primary color (#0e0712) with muted violet accents (#c2b1ce). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#0e0712) on a neutral background (#030104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030104black |
| Foreground | #0f0317black | #f8f5fawhitesmoke |
| Card | #ffffffwhite | #030104black |
| Card foreground | #0f0317black | #f8f5fawhitesmoke |
| Popover | #ffffffwhite | #030104black |
| Popover foreground | #0f0317black | #f8f5fawhitesmoke |
| Primary | #0e0712black | #0e0712black |
| Primary foreground | #ad80cbmediumpurple | #ad80cbmediumpurple |
| Secondary | #d3c9d9thistle | #221c27black |
| Secondary foreground | #3a2f42darkslategray | #bcaec6silver |
| Muted | #f3eff5whitesmoke | #0d0a10black |
| Muted foreground | #413947darkslategray | #c1b8c6silver |
| Accent | #c2b1cesilver | #35273fdarkslategray |
| Accent foreground | #281d2fdarkslategray | #cec0d8thistle |
| Destructive | #721408maroon | #f14832tomato |
| Destructive foreground | #fabbb3lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0e0712black | #0e0712black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.08:1 | AAA |
| Text on card | 20.08:1 | AAA |
| Primary button | 6.35:1 | AA |
| Secondary button | 7.89:1 | AAA |
| Muted text | 9.74:1 | AAA |
| Accent | 7.99:1 | AAA |
| Destructive | 7.01:1 | AAA |
| Text on background | 19.24:1 | AAA |
| Text on card | 19.24:1 | AAA |
| Primary button | 6.35:1 | AA |
| Secondary button | 7.94:1 | AAA |
| Muted text | 10.24:1 | AAA |
| Accent | 8.03:1 | AAA |
| Destructive | 3.67:1 | AA Large |
Paste this into your globals.css to use Cartoon in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.137 0.049 311.346);
--muted: oklch(0.958 0.008 312.294);
--muted-foreground: oklch(0.358 0.026 311.814);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.137 0.049 311.346);
--card: oklch(1 0 180);
--card-foreground: oklch(0.137 0.049 311.346);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.146 0.025 311.408);
--primary-foreground: oklch(0.672 0.118 311.009);
--secondary: oklch(0.849 0.024 312.151);
--secondary-foreground: oklch(0.324 0.036 311.518);
--accent: oklch(0.783 0.045 311.93);
--accent-foreground: oklch(0.253 0.036 311.299);
--destructive: oklch(0.361 0.13 31.076);
--destructive-foreground: oklch(0.847 0.074 27.267);
--ring: oklch(0.146 0.025 311.408);
--chart-1: oklch(0.146 0.025 311.408);
--chart-2: oklch(0.849 0.024 312.151);
--chart-3: oklch(0.783 0.045 311.93);
--chart-4: oklch(0.875 0.02 312.192);
--chart-5: oklch(0.146 0.027 311.387);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.081 0.019 314.363);
--foreground: oklch(0.974 0.007 312.305);
--muted: oklch(0.152 0.013 311.715);
--muted-foreground: oklch(0.795 0.022 312.156);
--popover: oklch(0.081 0.019 314.363);
--popover-foreground: oklch(0.974 0.007 312.305);
--card: oklch(0.081 0.019 314.363);
--card-foreground: oklch(0.974 0.007 312.305);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.146 0.025 311.408);
--primary-foreground: oklch(0.672 0.118 311.009);
--secondary: oklch(0.237 0.023 311.627);
--secondary-foreground: oklch(0.771 0.036 312.01);
--accent: oklch(0.3 0.047 311.158);
--accent-foreground: oklch(0.827 0.037 312.024);
--destructive: oklch(0.642 0.209 30.85);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.146 0.025 311.408);
--chart-1: oklch(0.146 0.025 311.408);
--chart-2: oklch(0.237 0.023 311.627);
--chart-3: oklch(0.3 0.047 311.158);
--chart-4: oklch(0.267 0.028 311.581);
--chart-5: oklch(0.146 0.027 311.387);
}