Barrier is a shadcn/ui theme built around a deep blue primary color (#2e4566) with deep green accents (#45662e). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the deep blue primary (#2e4566) on a blue-tinted background (#03070c).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfcfewhite | #03070cblack |
| Foreground | #010409black | #ffffffwhite |
| Card | #fbfcfewhite | #03070cblack |
| Card foreground | #010409black | #ffffffwhite |
| Popover | #fbfcfewhite | #03070cblack |
| Popover foreground | #010409black | #ffffffwhite |
| Primary | #2e4566darkslategray | #2e4566darkslategray |
| Primary foreground | #d8e1eegainsboro | #d8e1eegainsboro |
| Secondary | #662e45darkslategray | #662e45darkslategray |
| Secondary foreground | #eed8e1gainsboro | #eed8e1gainsboro |
| Muted | #ebe5e8linen | #1a1416black |
| Muted foreground | #575254dimgray | #ada8aadarkgray |
| Accent | #45662edarkolivegreen | #45662edarkolivegreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #7e1201maroon | #fd3e21orangered |
| Destructive foreground | #febdb3lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2e4566darkslategray | #2e4566darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.02:1 | AAA |
| Text on card | 20.02:1 | AAA |
| Primary button | 7.35:1 | AAA |
| Secondary button | 7.61:1 | AAA |
| Muted text | 6.17:1 | AA |
| Accent | 6.56:1 | AA |
| Destructive | 6.64:1 | AA |
| Text on background | 20.19:1 | AAA |
| Text on card | 20.19:1 | AAA |
| Primary button | 7.35:1 | AAA |
| Secondary button | 7.61:1 | AAA |
| Muted text | 7.75:1 | AAA |
| Accent | 6.56:1 | AA |
| Destructive | 3.57:1 | AA Large |
Paste this into your globals.css to use Barrier in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 256.664);
--foreground: oklch(0.107 0.018 244.979);
--muted: oklch(0.927 0.007 349.889);
--muted-foreground: oklch(0.443 0.007 350.134);
--popover: oklch(0.991 0.003 256.664);
--popover-foreground: oklch(0.107 0.018 244.979);
--card: oklch(0.991 0.003 256.664);
--card-foreground: oklch(0.107 0.018 244.979);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.388 0.063 256.923);
--primary-foreground: oklch(0.907 0.02 256.728);
--secondary: oklch(0.384 0.086 355.647);
--secondary-foreground: oklch(0.903 0.026 350.469);
--accent: oklch(0.471 0.092 133.772);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.383 0.144 31.828);
--destructive-foreground: oklch(0.856 0.077 28.659);
--ring: oklch(0.388 0.063 256.923);
--chart-1: oklch(0.388 0.063 256.923);
--chart-2: oklch(0.384 0.086 355.647);
--chart-3: oklch(0.471 0.092 133.772);
--chart-4: oklch(0.411 0.093 355.744);
--chart-5: oklch(0.387 0.068 256.954);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.015 248.8);
--foreground: oklch(1 0 180);
--muted: oklch(0.199 0.011 351.13);
--muted-foreground: oklch(0.737 0.006 349.917);
--popover: oklch(0.125 0.015 248.8);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.125 0.015 248.8);
--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.388 0.063 256.923);
--primary-foreground: oklch(0.907 0.02 256.728);
--secondary: oklch(0.384 0.086 355.647);
--secondary-foreground: oklch(0.903 0.026 350.469);
--accent: oklch(0.471 0.092 133.772);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.652 0.23 31.626);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.388 0.063 256.923);
--chart-1: oklch(0.388 0.063 256.923);
--chart-2: oklch(0.384 0.086 355.647);
--chart-3: oklch(0.471 0.092 133.772);
--chart-4: oklch(0.411 0.093 355.744);
--chart-5: oklch(0.387 0.068 256.954);
}