Grab-bag is a shadcn/ui theme built around a deep violet primary color (#48325d) with muted light violet accents (#c7bed0). The light mode uses a neutral background (#faf7fc). Dark mode keeps the deep violet primary (#48325d) on a violet-tinted background (#0a070e).
| Token | Light | Dark |
|---|---|---|
| Background | #faf7fcghostwhite | #0a070eblack |
| Foreground | #0d0515black | #ffffffwhite |
| Card | #faf7fcghostwhite | #0a070eblack |
| Card foreground | #0d0515black | #ffffffwhite |
| Popover | #faf7fcghostwhite | #0a070eblack |
| Popover foreground | #0d0515black | #ffffffwhite |
| Primary | #48325ddarkslategray | #48325ddarkslategray |
| Primary foreground | #e1d7eagainsboro | #e1d7eagainsboro |
| Secondary | #e1dde3gainsboro | #1f1b22black |
| Secondary foreground | #48404fdarkslategray | #b8b0bfsilver |
| Muted | #f2eff6whitesmoke | #0d0910black |
| Muted foreground | #665e6edimgray | #9991a1darkgray |
| Accent | #c7bed0silver | #33293ddarkslategray |
| Accent foreground | #2e2735darkslategray | #ccc2d6thistle |
| Destructive | #d32c12firebrick | #eb391eorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #48325ddarkslategray | #48325ddarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.89:1 | AAA |
| Text on card | 18.89:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 7.38:1 | AAA |
| Muted text | 5.42:1 | AA |
| Accent | 8.02:1 | AAA |
| Destructive | 5.06:1 | AA |
| Text on background | 20.03:1 | AAA |
| Text on card | 20.03:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 8.06:1 | AAA |
| Muted text | 6.50:1 | AA |
| Accent | 8.03:1 | AAA |
| Destructive | 4.07:1 | AA Large |
Paste this into your globals.css to use Grab-bag in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.007 309.049);
--foreground: oklch(0.139 0.037 307.527);
--muted: oklch(0.956 0.011 309.009);
--muted-foreground: oklch(0.495 0.028 308.542);
--popover: oklch(0.981 0.007 309.049);
--popover-foreground: oklch(0.139 0.037 307.527);
--card: oklch(0.981 0.007 309.049);
--card-foreground: oklch(0.139 0.037 307.527);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.362 0.076 306.79);
--primary-foreground: oklch(0.893 0.027 308.811);
--secondary: oklch(0.903 0.009 309.022);
--secondary-foreground: oklch(0.385 0.026 308.427);
--accent: oklch(0.814 0.027 308.78);
--accent-foreground: oklch(0.286 0.028 308.08);
--destructive: oklch(0.564 0.205 31.508);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.362 0.076 306.79);
--chart-1: oklch(0.362 0.076 306.79);
--chart-2: oklch(0.903 0.009 309.022);
--chart-3: oklch(0.814 0.027 308.78);
--chart-4: oklch(0.927 0.007 309.05);
--chart-5: oklch(0.359 0.083 306.505);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.136 0.018 308.908);
--foreground: oklch(1 0 180);
--muted: oklch(0.149 0.017 308.006);
--muted-foreground: oklch(0.669 0.026 308.724);
--popover: oklch(0.136 0.018 308.908);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.136 0.018 308.908);
--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.362 0.076 306.79);
--primary-foreground: oklch(0.893 0.027 308.811);
--secondary: oklch(0.23 0.014 308.498);
--secondary-foreground: oklch(0.768 0.024 308.8);
--accent: oklch(0.301 0.039 307.759);
--accent-foreground: oklch(0.828 0.03 308.742);
--destructive: oklch(0.618 0.218 31.626);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.362 0.076 306.79);
--chart-1: oklch(0.362 0.076 306.79);
--chart-2: oklch(0.23 0.014 308.498);
--chart-3: oklch(0.301 0.039 307.759);
--chart-4: oklch(0.261 0.017 308.454);
--chart-5: oklch(0.359 0.083 306.505);
}