Whimsical is a shadcn/ui theme built around a violet primary color (#ad89ec) with purple accents (#df89ec). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#ad89ec) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #000000black |
| Foreground | #0b0614black | #ffffffwhite |
| Card | #f9f7fdghostwhite | #030303black |
| Card foreground | #090510black | #ffffffwhite |
| Popover | #f9f7fdghostwhite | #030303black |
| Popover foreground | #090510black | #ffffffwhite |
| Primary | #ad89ecmediumpurple | #ad89ecmediumpurple |
| Primary foreground | #1b0939midnightblue | #1b0939midnightblue |
| Secondary | #8996eccornflowerblue | #8996eccornflowerblue |
| Secondary foreground | #091039midnightblue | #091039midnightblue |
| Muted | #dadcecgainsboro | #131525black |
| Muted foreground | #3c3d44darkslategray | #bbbcc3silver |
| Accent | #df89ecviolet | #df89ecviolet |
| Accent foreground | #330939midnightblue | #330939midnightblue |
| Destructive | #a53d0dsaddlebrown | #ee6c2ftomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ad89ecmediumpurple | #ad89ecmediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.40:1 | AAA |
| Text on card | 18.99:1 | AAA |
| Primary button | 6.58:1 | AA |
| Secondary button | 6.65:1 | AA |
| Muted text | 7.95:1 | AAA |
| Accent | 7.17:1 | AAA |
| Destructive | 6.39:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 6.58:1 | AA |
| Secondary button | 6.65:1 | AA |
| Muted text | 9.52:1 | AAA |
| Accent | 7.17:1 | AAA |
| Destructive | 6.82:1 | AA |
Paste this into your globals.css to use Whimsical in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 302.871);
--foreground: oklch(0.139 0.031 300.6);
--muted: oklch(0.898 0.021 278.973);
--muted-foreground: oklch(0.361 0.011 278.845);
--popover: oklch(0.98 0.008 302.811);
--popover-foreground: oklch(0.128 0.027 302.241);
--card: oklch(0.98 0.008 302.811);
--card-foreground: oklch(0.128 0.027 302.241);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.703 0.145 299.57);
--primary-foreground: oklch(0.204 0.086 294.153);
--secondary: oklch(0.698 0.127 275.961);
--secondary-foreground: oklch(0.198 0.08 270.448);
--accent: oklch(0.753 0.164 322.085);
--accent-foreground: oklch(0.241 0.094 321.994);
--destructive: oklch(0.501 0.147 40.783);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.703 0.145 299.57);
--chart-1: oklch(0.703 0.145 299.57);
--chart-2: oklch(0.698 0.127 275.961);
--chart-3: oklch(0.753 0.164 322.085);
--chart-4: oklch(0.731 0.112 276.583);
--chart-5: oklch(0.7 0.151 299.397);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.204 0.031 276.561);
--muted-foreground: oklch(0.798 0.009 279.163);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.092 0 180);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.703 0.145 299.57);
--primary-foreground: oklch(0.204 0.086 294.153);
--secondary: oklch(0.698 0.127 275.961);
--secondary-foreground: oklch(0.198 0.08 270.448);
--accent: oklch(0.753 0.164 322.085);
--accent-foreground: oklch(0.241 0.094 321.994);
--destructive: oklch(0.68 0.176 42.788);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.703 0.145 299.57);
--chart-1: oklch(0.703 0.145 299.57);
--chart-2: oklch(0.698 0.127 275.961);
--chart-3: oklch(0.753 0.164 322.085);
--chart-4: oklch(0.731 0.112 276.583);
--chart-5: oklch(0.7 0.151 299.397);
}