General is a shadcn/ui theme built around a vivid purple primary color (#c01ef6) with muted purple accents (#c0b7c3). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#c01ef6) on a purple-tinted background (#09040b).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #09040bblack |
| Foreground | #0a030cblack | #fdfcfdwhite |
| Card | #ffffffwhite | #09040bblack |
| Card foreground | #0a030cblack | #fdfcfdwhite |
| Popover | #ffffffwhite | #09040bblack |
| Popover foreground | #0a030cblack | #fdfcfdwhite |
| Primary | #c01ef6blueviolet | #c01ef6blueviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #d4d2d5lightgrey | #242225black |
| Secondary foreground | #3c393cdarkslategray | #bebabfsilver |
| Muted | #e1d0e7gainsboro | #2a182fdarkslategray |
| Muted foreground | #634e6adimgray | #aa95b1darkgray |
| Accent | #c0b7c3silver | #3b323edarkslategray |
| Accent foreground | #252027darkslategray | #d3cdd6lightgrey |
| Destructive | #832207maroon | #e43b0corangered |
| Destructive foreground | #fccdc0peachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c01ef6blueviolet | #c01ef6blueviolet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.36:1 | AAA |
| Text on card | 20.36:1 | AAA |
| Primary button | 4.42:1 | AA Large |
| Secondary button | 7.60:1 | AAA |
| Muted text | 5.06:1 | AA |
| Accent | 8.19:1 | AAA |
| Destructive | 6.67:1 | AA |
| Text on background | 19.82:1 | AAA |
| Text on card | 19.82:1 | AAA |
| Primary button | 4.42:1 | AA Large |
| Secondary button | 8.21:1 | AAA |
| Muted text | 6.02:1 | AA |
| Accent | 7.83:1 | AAA |
| Destructive | 4.27:1 | AA Large |
Paste this into your globals.css to use General in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.12 0.029 319.443);
--muted: oklch(0.878 0.037 317.694);
--muted-foreground: oklch(0.456 0.051 317.573);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.12 0.029 319.443);
--card: oklch(1 0 180);
--card-foreground: oklch(0.12 0.029 319.443);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.611 0.288 314.701);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.867 0.004 317.755);
--secondary-foreground: oklch(0.348 0.007 317.73);
--accent: oklch(0.79 0.019 317.723);
--accent-foreground: oklch(0.254 0.014 317.674);
--destructive: oklch(0.406 0.136 34.879);
--destructive-foreground: oklch(0.885 0.056 35.963);
--ring: oklch(0.611 0.288 314.701);
--chart-1: oklch(0.611 0.288 314.701);
--chart-2: oklch(0.867 0.004 317.755);
--chart-3: oklch(0.79 0.019 317.723);
--chart-4: oklch(0.891 0.003 317.757);
--chart-5: oklch(0.614 0.292 314.503);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.123 0.022 319.19);
--foreground: oklch(0.992 0.002 317.761);
--muted: oklch(0.243 0.05 317.352);
--muted-foreground: oklch(0.698 0.046 317.655);
--popover: oklch(0.123 0.022 319.19);
--popover-foreground: oklch(0.992 0.002 317.761);
--card: oklch(0.123 0.022 319.19);
--card-foreground: oklch(0.992 0.002 317.761);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.611 0.288 314.701);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.257 0.006 317.724);
--secondary-foreground: oklch(0.794 0.009 317.745);
--accent: oklch(0.332 0.023 317.652);
--accent-foreground: oklch(0.855 0.015 317.735);
--destructive: oklch(0.605 0.211 34.185);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.611 0.288 314.701);
--chart-1: oklch(0.611 0.288 314.701);
--chart-2: oklch(0.257 0.006 317.724);
--chart-3: oklch(0.332 0.023 317.652);
--chart-4: oklch(0.288 0.007 317.722);
--chart-5: oklch(0.614 0.292 314.503);
}