Straw is a shadcn/ui theme built around a muted deep violet primary color (#2b2730) with muted deep green accents (#27302b). The light mode uses a neutral background (#faf8fc). Dark mode keeps the muted deep violet primary (#2b2730) on a neutral background (#020203).
| Token | Light | Dark |
|---|---|---|
| Background | #faf8fcghostwhite | #020203black |
| Foreground | #0c0614black | #faf9fbghostwhite |
| Card | #f7f4fbghostwhite | #050407black |
| Card foreground | #0a0510black | #fcfcfdwhite |
| Popover | #faf8fcghostwhite | #020203black |
| Popover foreground | #0c0614black | #faf9fbghostwhite |
| Primary | #2b2730darkslategray | #2b2730darkslategray |
| Primary foreground | #c4becbsilver | #c4becbsilver |
| Secondary | #302b27darkslategray | #302b27darkslategray |
| Secondary foreground | #cbc4besilver | #cbc4besilver |
| Muted | #e2dbd4gainsboro | #2b231dblack |
| Muted foreground | #4a4745darkslategray | #bab7b5silver |
| Accent | #27302bdarkslategray | #27302bdarkslategray |
| Accent foreground | #becbc4silver | #becbc4silver |
| Destructive | #9a1a09darkred | #f3422borangered |
| Destructive foreground | #fdddd8mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2b2730darkslategray | #2b2730darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.87:1 | AAA |
| Text on card | 18.51:1 | AAA |
| Primary button | 8.09:1 | AAA |
| Secondary button | 8.12:1 | AAA |
| Muted text | 6.71:1 | AA |
| Accent | 8.11:1 | AAA |
| Destructive | 6.52:1 | AA |
| Text on background | 19.76:1 | AAA |
| Text on card | 19.98:1 | AAA |
| Primary button | 8.09:1 | AAA |
| Secondary button | 8.12:1 | AAA |
| Muted text | 7.74:1 | AAA |
| Accent | 8.11:1 | AAA |
| Destructive | 3.73:1 | AA Large |
Paste this into your globals.css to use Straw in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.006 306.348);
--foreground: oklch(0.14 0.033 304.492);
--muted: oklch(0.895 0.012 62.011);
--muted-foreground: oklch(0.4 0.005 62.044);
--popover: oklch(0.981 0.006 306.348);
--popover-foreground: oklch(0.14 0.033 304.492);
--card: oklch(0.971 0.009 306.307);
--card-foreground: oklch(0.129 0.029 306.069);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.28 0.018 305.594);
--primary-foreground: oklch(0.81 0.019 306.129);
--secondary: oklch(0.293 0.011 61.687);
--secondary-foreground: oklch(0.823 0.011 62.01);
--accent: oklch(0.299 0.016 161.21);
--accent-foreground: oklch(0.83 0.017 162.1);
--destructive: oklch(0.444 0.165 30.972);
--destructive-foreground: oklch(0.922 0.036 26.749);
--ring: oklch(0.28 0.018 305.594);
--chart-1: oklch(0.28 0.018 305.594);
--chart-2: oklch(0.293 0.011 61.687);
--chart-3: oklch(0.299 0.016 161.21);
--chart-4: oklch(0.324 0.012 61.667);
--chart-5: oklch(0.277 0.023 305.352);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.086 0.009 307.077);
--foreground: oklch(0.984 0.002 306.406);
--muted: oklch(0.263 0.017 61.283);
--muted-foreground: oklch(0.782 0.004 62.129);
--popover: oklch(0.086 0.009 307.077);
--popover-foreground: oklch(0.984 0.002 306.406);
--card: oklch(0.108 0.011 307.077);
--card-foreground: oklch(0.992 0.001 306.417);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.28 0.018 305.594);
--primary-foreground: oklch(0.81 0.019 306.129);
--secondary: oklch(0.293 0.011 61.687);
--secondary-foreground: oklch(0.823 0.011 62.01);
--accent: oklch(0.299 0.016 161.21);
--accent-foreground: oklch(0.83 0.017 162.1);
--destructive: oklch(0.639 0.216 30.97);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.28 0.018 305.594);
--chart-1: oklch(0.28 0.018 305.594);
--chart-2: oklch(0.293 0.011 61.687);
--chart-3: oklch(0.299 0.016 161.21);
--chart-4: oklch(0.324 0.012 61.667);
--chart-5: oklch(0.277 0.023 305.352);
}