Barrel is a shadcn/ui theme built around a light violet primary color (#c1a5e3) with muted light violet accents (#eae7ee). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the light violet primary (#c1a5e3) on a violet-tinted background (#0a060f).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #0a060fblack |
| Foreground | #07030cblack | #fcfcfdwhite |
| Card | #faf6fdghostwhite | #0c0713black |
| Card foreground | #050208black | #ffffffwhite |
| Popover | #faf6fdghostwhite | #0c0713black |
| Popover foreground | #050208black | #ffffffwhite |
| Primary | #c1a5e3plum | #c1a5e3plum |
| Primary foreground | #291442midnightblue | #291442midnightblue |
| Secondary | #eae7eelavender | #262428darkslategray |
| Secondary foreground | #50455fdarkslategray | #bfbcc2silver |
| Muted | #efeaf5lavender | #0f0a15black |
| Muted foreground | #584f63dimgray | #a59cb0darkgray |
| Accent | #eae7eelavender | #262428darkslategray |
| Accent foreground | #50455fdarkslategray | #bfbcc2silver |
| Destructive | #6b2606maroon | #f46d2ftomato |
| Destructive foreground | #fac2a8lightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c1a5e3plum | #c1a5e3plum |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.80:1 | AAA |
| Text on card | 19.35:1 | AAA |
| Primary button | 7.68:1 | AAA |
| Secondary button | 7.29:1 | AAA |
| Muted text | 6.56:1 | AA |
| Accent | 7.29:1 | AAA |
| Destructive | 7.04:1 | AAA |
| Text on background | 19.63:1 | AAA |
| Text on card | 19.90:1 | AAA |
| Primary button | 7.68:1 | AAA |
| Secondary button | 8.16:1 | AAA |
| Muted text | 7.43:1 | AAA |
| Accent | 8.16:1 | AAA |
| Destructive | 7.08:1 | AAA |
Paste this into your globals.css to use Barrel in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.005 306.367);
--foreground: oklch(0.114 0.028 307.629);
--muted: oklch(0.945 0.015 306.23);
--muted-foreground: oklch(0.445 0.033 305.467);
--popover: oklch(0.979 0.01 306.303);
--popover-foreground: oklch(0.1 0.025 307.975);
--card: oklch(0.979 0.01 306.303);
--card-foreground: oklch(0.1 0.025 307.975);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.769 0.092 304.882);
--primary-foreground: oklch(0.249 0.084 301.26);
--secondary: oklch(0.933 0.009 306.302);
--secondary-foreground: oklch(0.411 0.045 305.011);
--accent: oklch(0.933 0.009 306.302);
--accent-foreground: oklch(0.411 0.045 305.011);
--destructive: oklch(0.366 0.106 41.229);
--destructive-foreground: oklch(0.858 0.074 46.054);
--ring: oklch(0.769 0.092 304.882);
--chart-1: oklch(0.769 0.092 304.882);
--chart-2: oklch(0.933 0.009 306.302);
--chart-3: oklch(0.933 0.009 306.302);
--chart-4: oklch(0.958 0.006 306.352);
--chart-5: oklch(0.766 0.097 304.785);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.132 0.023 306.087);
--foreground: oklch(0.991 0.002 306.407);
--muted: oklch(0.157 0.023 304.528);
--muted-foreground: oklch(0.706 0.03 305.889);
--popover: oklch(0.143 0.027 304.652);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.143 0.027 304.652);
--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.769 0.092 304.882);
--primary-foreground: oklch(0.249 0.084 301.26);
--secondary: oklch(0.265 0.007 306.071);
--secondary-foreground: oklch(0.8 0.009 306.278);
--accent: oklch(0.265 0.007 306.071);
--accent-foreground: oklch(0.8 0.009 306.278);
--destructive: oklch(0.691 0.181 42.632);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.769 0.092 304.882);
--chart-1: oklch(0.769 0.092 304.882);
--chart-2: oklch(0.265 0.007 306.071);
--chart-3: oklch(0.265 0.007 306.071);
--chart-4: oklch(0.295 0.009 306.053);
--chart-5: oklch(0.766 0.097 304.785);
}