Learning is a shadcn/ui theme built around a vivid violet primary color (#8234ef) with muted violet accents (#bdb1cd). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#8234ef) on a violet-tinted background (#090410).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #090410black |
| Foreground | #07030cblack | #ffffffwhite |
| Card | #ffffffwhite | #090410black |
| Card foreground | #07030cblack | #ffffffwhite |
| Popover | #ffffffwhite | #090410black |
| Popover foreground | #07030cblack | #ffffffwhite |
| Primary | #8234efblueviolet | #8234efblueviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #cdc7d6thistle | #2d2735darkslategray |
| Secondary foreground | #342d3edarkslategray | #c5becfsilver |
| Muted | #e7e0f0lavender | #160f1fblack |
| Muted foreground | #59575bdimgray | #a5a4a8darkgray |
| Accent | #bdb1cdsilver | #403451darkslategray |
| Accent foreground | #251e2fdarkslategray | #dad3e3gainsboro |
| Destructive | #651f01maroon | #f94b01orangered |
| Destructive foreground | #feb89aburlywood | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8234efblueviolet | #8234efblueviolet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.44:1 | AAA |
| Text on card | 20.44:1 | AAA |
| Primary button | 5.70:1 | AA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 5.54:1 | AA |
| Accent | 7.93:1 | AAA |
| Destructive | 7.15:1 | AAA |
| Text on background | 20.22:1 | AAA |
| Text on card | 20.22:1 | AAA |
| Primary button | 5.70:1 | AA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 7.56:1 | AAA |
| Accent | 7.90:1 | AAA |
| Destructive | 3.47:1 | AA Large |
Paste this into your globals.css to use Learning in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.115 0.026 305.989);
--muted: oklch(0.916 0.023 304.693);
--muted-foreground: oklch(0.461 0.006 304.865);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.115 0.026 305.989);
--card: oklch(1 0 180);
--card-foreground: oklch(0.115 0.026 305.989);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.543 0.254 295.328);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.839 0.022 304.676);
--secondary-foreground: oklch(0.312 0.032 303.634);
--accent: oklch(0.78 0.041 304.313);
--accent-foreground: oklch(0.25 0.033 303.208);
--destructive: oklch(0.347 0.108 39.954);
--destructive-foreground: oklch(0.841 0.092 44.146);
--ring: oklch(0.543 0.254 295.328);
--chart-1: oklch(0.543 0.254 295.328);
--chart-2: oklch(0.839 0.022 304.676);
--chart-3: oklch(0.78 0.041 304.313);
--chart-4: oklch(0.865 0.019 304.746);
--chart-5: oklch(0.542 0.26 294.807);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.03 304.557);
--foreground: oklch(1 0 180);
--muted: oklch(0.185 0.034 302.367);
--muted-foreground: oklch(0.721 0.005 304.942);
--popover: oklch(0.127 0.03 304.557);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.127 0.03 304.557);
--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.543 0.254 295.328);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.285 0.026 303.777);
--secondary-foreground: oklch(0.814 0.025 304.629);
--accent: oklch(0.35 0.052 302.94);
--accent-foreground: oklch(0.878 0.022 304.692);
--destructive: oklch(0.656 0.219 37.05);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.543 0.254 295.328);
--chart-1: oklch(0.543 0.254 295.328);
--chart-2: oklch(0.285 0.026 303.777);
--chart-3: oklch(0.35 0.052 302.94);
--chart-4: oklch(0.313 0.03 303.729);
--chart-5: oklch(0.542 0.26 294.807);
}