Straw is a shadcn/ui theme built around a purple primary color (#833a83) with pink accents (#833a5e). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#833a83) on a purple-tinted background (#100410).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #100410black |
| Foreground | #090109black | #fdfcfdwhite |
| Card | #ffffffwhite | #100410black |
| Card foreground | #090109black | #fdfcfdwhite |
| Popover | #ffffffwhite | #100410black |
| Popover foreground | #090109black | #fdfcfdwhite |
| Primary | #833a83rebeccapurple | #833a83rebeccapurple |
| Primary foreground | #faf4faghostwhite | #faf4faghostwhite |
| Secondary | #5e3a83darkslateblue | #5e3a83darkslateblue |
| Secondary foreground | #f7f4fawhitesmoke | #f7f4fawhitesmoke |
| Muted | #dedbe1gainsboro | #211e24black |
| Muted foreground | #403b44darkslategray | #bfbbc4silver |
| Accent | #833a5edimgray | #833a5edimgray |
| Accent foreground | #faf4f7whitesmoke | #faf4f7whitesmoke |
| Destructive | #832902saddlebrown | #fb550eorangered |
| Destructive foreground | #fecdb9peachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #833a83rebeccapurple | #833a83rebeccapurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.59:1 | AAA |
| Text on card | 20.59:1 | AAA |
| Primary button | 6.70:1 | AA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 7.92:1 | AAA |
| Accent | 7.09:1 | AAA |
| Destructive | 6.44:1 | AA |
| Text on background | 19.57:1 | AAA |
| Text on card | 19.57:1 | AAA |
| Primary button | 6.70:1 | AA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 8.72:1 | AAA |
| Accent | 7.09:1 | AAA |
| Destructive | 3.26:1 | AA Large |
Paste this into your globals.css to use Straw in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.106 0.036 327.748);
--muted: oklch(0.895 0.01 308.341);
--muted-foreground: oklch(0.361 0.016 307.963);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.106 0.036 327.748);
--card: oklch(1 0 180);
--card-foreground: oklch(0.106 0.036 327.748);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.473 0.139 327.499);
--primary-foreground: oklch(0.975 0.01 325.654);
--secondary: oklch(0.426 0.122 304.868);
--secondary-foreground: oklch(0.972 0.008 308.363);
--accent: oklch(0.456 0.11 351.129);
--accent-foreground: oklch(0.974 0.007 345.343);
--destructive: oklch(0.413 0.131 38.959);
--destructive-foreground: oklch(0.887 0.062 44.409);
--ring: oklch(0.473 0.139 327.499);
--chart-1: oklch(0.473 0.139 327.499);
--chart-2: oklch(0.426 0.122 304.868);
--chart-3: oklch(0.456 0.11 351.129);
--chart-4: oklch(0.449 0.13 304.823);
--chart-5: oklch(0.475 0.148 327.598);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.138 0.036 327.31);
--foreground: oklch(0.992 0.002 325.589);
--muted: oklch(0.241 0.013 307.847);
--muted-foreground: oklch(0.798 0.013 308.275);
--popover: oklch(0.138 0.036 327.31);
--popover-foreground: oklch(0.992 0.002 325.589);
--card: oklch(0.138 0.036 327.31);
--card-foreground: oklch(0.992 0.002 325.589);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.473 0.139 327.499);
--primary-foreground: oklch(0.975 0.01 325.654);
--secondary: oklch(0.426 0.122 304.868);
--secondary-foreground: oklch(0.972 0.008 308.363);
--accent: oklch(0.456 0.11 351.129);
--accent-foreground: oklch(0.974 0.007 345.343);
--destructive: oklch(0.67 0.213 38.379);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.473 0.139 327.499);
--chart-1: oklch(0.473 0.139 327.499);
--chart-2: oklch(0.426 0.122 304.868);
--chart-3: oklch(0.456 0.11 351.129);
--chart-4: oklch(0.449 0.13 304.823);
--chart-5: oklch(0.475 0.148 327.598);
}