Barn is a shadcn/ui theme built around a red primary color (#de5e65) with muted light red accents (#d5c3c4). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the red primary (#de5e65) on a neutral background (#040101).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfcsnow | #040101black |
| Foreground | #100405black | #fdfbfcsnow |
| Card | #fcf8f8snow | #080303black |
| Card foreground | #0c0304black | #ffffffwhite |
| Popover | #fcf8f8snow | #080303black |
| Popover foreground | #0c0304black | #ffffffwhite |
| Primary | #de5e65indianred | #de5e65indianred |
| Primary foreground | #000000black | #000000black |
| Secondary | #e5e0e1gainsboro | #342d2ddarkslategray |
| Secondary foreground | #514344darkslategray | #cdc6c6silver |
| Muted | #ebe0e1gainsboro | #1f1415black |
| Muted foreground | #524243darkslategray | #bdadaedarkgray |
| Accent | #d5c3c4thistle | #4d3839darkslategray |
| Accent foreground | #3c2a2bdarkslategray | #e1d6d6gainsboro |
| Destructive | #7a3005saddlebrown | #f67328tomato |
| Destructive foreground | #fccfb6peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #de5e65indianred | #de5e65indianred |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.64:1 | AAA |
| Text on card | 19.34:1 | AAA |
| Primary button | 5.90:1 | AA |
| Secondary button | 7.21:1 | AAA |
| Muted text | 7.34:1 | AAA |
| Accent | 7.97:1 | AAA |
| Destructive | 6.52:1 | AA |
| Text on background | 20.15:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 5.90:1 | AA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 8.33:1 | AAA |
| Accent | 7.65:1 | AAA |
| Destructive | 7.41:1 | AAA |
Paste this into your globals.css to use Barn in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 13.643);
--foreground: oklch(0.132 0.026 16.789);
--muted: oklch(0.916 0.012 13.862);
--muted-foreground: oklch(0.396 0.023 14.764);
--popover: oklch(0.982 0.004 13.68);
--popover-foreground: oklch(0.118 0.022 16.309);
--card: oklch(0.982 0.004 13.68);
--card-foreground: oklch(0.118 0.022 16.309);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.645 0.16 19.735);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.912 0.006 13.727);
--secondary-foreground: oklch(0.398 0.018 14.537);
--accent: oklch(0.832 0.021 14.106);
--accent-foreground: oklch(0.306 0.028 15.471);
--destructive: oklch(0.409 0.115 44.278);
--destructive-foreground: oklch(0.888 0.061 51.702);
--ring: oklch(0.645 0.16 19.735);
--chart-1: oklch(0.645 0.16 19.735);
--chart-2: oklch(0.912 0.006 13.727);
--chart-3: oklch(0.832 0.021 14.106);
--chart-4: oklch(0.936 0.004 13.691);
--chart-5: oklch(0.645 0.167 20.096);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.084 0.012 15.525);
--foreground: oklch(0.991 0.002 13.648);
--muted: oklch(0.206 0.018 15.385);
--muted-foreground: oklch(0.761 0.019 14.101);
--popover: oklch(0.106 0.015 15.525);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.106 0.015 15.525);
--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.645 0.16 19.735);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.305 0.01 14.259);
--secondary-foreground: oklch(0.832 0.008 13.808);
--accent: oklch(0.364 0.03 15.333);
--accent-foreground: oklch(0.884 0.013 13.891);
--destructive: oklch(0.702 0.18 46.044);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.645 0.16 19.735);
--chart-1: oklch(0.645 0.16 19.735);
--chart-2: oklch(0.305 0.01 14.259);
--chart-3: oklch(0.364 0.03 15.333);
--chart-4: oklch(0.334 0.011 14.28);
--chart-5: oklch(0.645 0.167 20.096);
}