Barley is a shadcn/ui theme built around a deep blue primary color (#0d205e) with muted light blue accents (#c2c7d6). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#0d205e) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #010309black | #f8f9fbghostwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #010205black | #fcfcfdwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #010309black | #f8f9fbghostwhite |
| Primary | #0d205emidnightblue | #0d205emidnightblue |
| Primary foreground | #aabbf3lightsteelblue | #aabbf3lightsteelblue |
| Secondary | #dfe1e7gainsboro | #191c24black |
| Secondary foreground | #404454darkslategray | #abb1c4silver |
| Muted | #dddee4gainsboro | #1b1d22black |
| Muted foreground | #5e626edimgray | #9195a1lightslategray |
| Accent | #c2c7d6lightsteelblue | #2a3146darkslategray |
| Accent foreground | #292e3ddarkslategray | #c6cbddlightgrey |
| Destructive | #cd1f04firebrick | #e12205red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0d205emidnightblue | #0d205emidnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.62:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 8.01:1 | AAA |
| Secondary button | 7.38:1 | AAA |
| Muted text | 4.54:1 | AA |
| Accent | 7.98:1 | AAA |
| Destructive | 5.53:1 | AA |
| Text on background | 19.93:1 | AAA |
| Text on card | 20.16:1 | AAA |
| Primary button | 8.01:1 | AAA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 5.64:1 | AA |
| Accent | 8.01:1 | AAA |
| Destructive | 4.74:1 | AA |
Paste this into your globals.css to use Barley in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.098 0.022 261.231);
--muted: oklch(0.902 0.008 272.566);
--muted-foreground: oklch(0.496 0.02 272.187);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.098 0.022 261.231);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.078 0.017 261.231);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.275 0.112 265.973);
--primary-foreground: oklch(0.799 0.081 271.341);
--secondary: oklch(0.91 0.008 272.561);
--secondary-foreground: oklch(0.39 0.028 271.792);
--accent: oklch(0.829 0.022 272.36);
--accent-foreground: oklch(0.302 0.029 271.421);
--destructive: oklch(0.543 0.208 31.131);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.275 0.112 265.973);
--chart-1: oklch(0.275 0.112 265.973);
--chart-2: oklch(0.91 0.008 272.561);
--chart-3: oklch(0.829 0.022 272.36);
--chart-4: oklch(0.934 0.006 272.59);
--chart-5: oklch(0.274 0.116 265.713);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.983 0.003 272.624);
--muted: oklch(0.23 0.011 272.093);
--muted-foreground: oklch(0.67 0.019 272.345);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.983 0.003 272.624);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.991 0.002 272.641);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.275 0.112 265.973);
--primary-foreground: oklch(0.799 0.081 271.341);
--secondary: oklch(0.227 0.016 271.802);
--secondary-foreground: oklch(0.762 0.027 272.254);
--accent: oklch(0.315 0.04 270.969);
--accent-foreground: oklch(0.843 0.025 272.327);
--destructive: oklch(0.582 0.224 31.052);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.275 0.112 265.973);
--chart-1: oklch(0.275 0.112 265.973);
--chart-2: oklch(0.227 0.016 271.802);
--chart-3: oklch(0.315 0.04 270.969);
--chart-4: oklch(0.257 0.019 271.731);
--chart-5: oklch(0.274 0.116 265.713);
}