Buttery is a shadcn/ui theme built around a muted purple primary color (#5f3a5e) with muted green accents (#3a5f3b). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#5f3a5e) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #0e020dblack | #ffffffwhite |
| Card | #ffffffwhite | #000000black |
| Card foreground | #0e020dblack | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #0e020dblack | #ffffffwhite |
| Primary | #5f3a5edimgray | #5f3a5edimgray |
| Primary foreground | #ecdfeblavender | #ecdfeblavender |
| Secondary | #3a5f3bdarkslategray | #3a5f3bdarkslategray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e1eae1gainsboro | #151e15black |
| Muted foreground | #5b675bdimgray | #98a498darkgray |
| Accent | #3a5f3bdarkslategray | #3a5f3bdarkslategray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #6a1301maroon | #fc2c03orangered |
| Destructive foreground | #feaf9flightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5f3a5edimgray | #5f3a5edimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.32:1 | AAA |
| Text on card | 20.32:1 | AAA |
| Primary button | 7.23:1 | AAA |
| Secondary button | 7.30:1 | AAA |
| Muted text | 4.82:1 | AA |
| Accent | 7.30:1 | AAA |
| Destructive | 6.95:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 7.23:1 | AAA |
| Secondary button | 7.30:1 | AAA |
| Muted text | 6.59:1 | AA |
| Accent | 7.30:1 | AAA |
| Destructive | 3.80:1 | AA Large |
Paste this into your globals.css to use Buttery in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.121 0.042 328.279);
--muted: oklch(0.928 0.015 145.925);
--muted-foreground: oklch(0.499 0.023 145.673);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.121 0.042 328.279);
--card: oklch(1 0 180);
--card-foreground: oklch(0.121 0.042 328.279);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.407 0.075 327.418);
--primary-foreground: oklch(0.918 0.021 326.235);
--secondary: oklch(0.447 0.072 144.626);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.447 0.072 144.626);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.342 0.124 33.323);
--destructive-foreground: oklch(0.826 0.096 31.719);
--ring: oklch(0.407 0.075 327.418);
--chart-1: oklch(0.407 0.075 327.418);
--chart-2: oklch(0.447 0.072 144.626);
--chart-3: oklch(0.447 0.072 144.626);
--chart-4: oklch(0.477 0.078 144.608);
--chart-5: oklch(0.406 0.084 327.565);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.223 0.021 145.261);
--muted-foreground: oklch(0.706 0.021 145.808);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.407 0.075 327.418);
--primary-foreground: oklch(0.918 0.021 326.235);
--secondary: oklch(0.447 0.072 144.626);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.447 0.072 144.626);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.638 0.242 31.733);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.407 0.075 327.418);
--chart-1: oklch(0.407 0.075 327.418);
--chart-2: oklch(0.447 0.072 144.626);
--chart-3: oklch(0.447 0.072 144.626);
--chart-4: oklch(0.477 0.078 144.608);
--chart-5: oklch(0.406 0.084 327.565);
}