Barrel is a shadcn/ui theme built around a muted deep green primary color (#2f4b3b) with muted deep teal accents (#2f4b49). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#2f4b3b) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #030c07black | #fcfdfcwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #020805black | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #030c07black | #fcfdfcwhite |
| Primary | #2f4b3bdarkslategray | #2f4b3bdarkslategray |
| Primary foreground | #cde0d5lightgrey | #cde0d5lightgrey |
| Secondary | #314b2fdarkslategray | #314b2fdarkslategray |
| Secondary foreground | #cee0cdlightgrey | #cee0cdlightgrey |
| Muted | #e2efe1gainsboro | #111e10black |
| Muted foreground | #616c60dimgray | #949f93darkseagreen |
| Accent | #2f4b49darkslategray | #2f4b49darkslategray |
| Accent foreground | #cde0degainsboro | #cde0degainsboro |
| Destructive | #731d0cmaroon | #eb5e42tomato |
| Destructive foreground | #f8c4balightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2f4b3bdarkslategray | #2f4b3bdarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.82:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 6.92:1 | AA |
| Secondary button | 6.93:1 | AA |
| Muted text | 4.62:1 | AA |
| Accent | 6.86:1 | AA |
| Destructive | 7.08:1 | AAA |
| Text on background | 20.59:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 6.92:1 | AA |
| Secondary button | 6.93:1 | AA |
| Muted text | 6.27:1 | AA |
| Accent | 6.86:1 | AA |
| Destructive | 6.21:1 | AA |
Paste this into your globals.css to use Barrel in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.142 0.02 160.674);
--muted: oklch(0.939 0.023 143.017);
--muted-foreground: oklch(0.518 0.023 142.922);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.142 0.02 160.674);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.123 0.017 160.944);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.386 0.044 157.927);
--primary-foreground: oklch(0.888 0.025 160.337);
--secondary: oklch(0.384 0.056 142.434);
--secondary-foreground: oklch(0.887 0.031 142.969);
--accent: oklch(0.391 0.034 189.232);
--accent-foreground: oklch(0.891 0.02 190.753);
--destructive: oklch(0.372 0.123 33.076);
--destructive-foreground: oklch(0.864 0.061 31.353);
--ring: oklch(0.386 0.044 157.927);
--chart-1: oklch(0.386 0.044 157.927);
--chart-2: oklch(0.384 0.056 142.434);
--chart-3: oklch(0.391 0.034 189.232);
--chart-4: oklch(0.416 0.062 142.421);
--chart-5: oklch(0.39 0.049 157.525);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.993 0.001 160.988);
--muted: oklch(0.218 0.033 142.417);
--muted-foreground: oklch(0.69 0.022 142.986);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.993 0.001 160.988);
--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.386 0.044 157.927);
--primary-foreground: oklch(0.888 0.025 160.337);
--secondary: oklch(0.384 0.056 142.434);
--secondary-foreground: oklch(0.887 0.031 142.969);
--accent: oklch(0.391 0.034 189.232);
--accent-foreground: oklch(0.891 0.02 190.753);
--destructive: oklch(0.659 0.181 33.142);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.386 0.044 157.927);
--chart-1: oklch(0.386 0.044 157.927);
--chart-2: oklch(0.384 0.056 142.434);
--chart-3: oklch(0.391 0.034 189.232);
--chart-4: oklch(0.416 0.062 142.421);
--chart-5: oklch(0.39 0.049 157.525);
}