Alfalfa is a shadcn/ui theme built around a deep red primary color (#791b24) with deep orange accents (#79401b). The light mode uses a neutral background (#fdf6f7). Dark mode keeps the deep red primary (#791b24) on a red-tinted background (#0f0506).
| Token | Light | Dark |
|---|---|---|
| Background | #fdf6f7snow | #0f0506black |
| Foreground | #000000black | #ffffffwhite |
| Card | #fdf2f3lavenderblush | #130708black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fdf2f3lavenderblush | #130708black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #791b24maroon | #791b24maroon |
| Primary foreground | #f5d1d5pink | #f5d1d5pink |
| Secondary | #791b53purple | #791b53purple |
| Secondary foreground | #f5d1e7mistyrose | #f5d1e7mistyrose |
| Muted | #e3cfdbgainsboro | #301c28darkslategray |
| Muted foreground | #4a4548darkslategray | #bab5b8silver |
| Accent | #79401bsaddlebrown | #79401bsaddlebrown |
| Accent foreground | #f5dfd1antiquewhite | #f5dfd1antiquewhite |
| Destructive | #661100maroon | #ff512etomato |
| Destructive foreground | #ffaa99lightsalmon | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #791b24maroon | #791b24maroon |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.76:1 | AAA |
| Text on card | 19.16:1 | AAA |
| Primary button | 7.49:1 | AAA |
| Secondary button | 7.22:1 | AAA |
| Muted text | 6.34:1 | AA |
| Accent | 6.34:1 | AA |
| Destructive | 6.96:1 | AA |
| Text on background | 20.07:1 | AAA |
| Text on card | 19.82:1 | AAA |
| Primary button | 7.49:1 | AAA |
| Secondary button | 7.22:1 | AAA |
| Muted text | 7.83:1 | AAA |
| Accent | 6.34:1 | AA |
| Destructive | 6.46:1 | AA |
Paste this into your globals.css to use Alfalfa in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.98 0.008 10.254);
--foreground: oklch(0 0 0);
--muted: oklch(0.874 0.027 340.926);
--muted-foreground: oklch(0.396 0.007 340.637);
--popover: oklch(0.97 0.011 10.346);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.97 0.011 10.346);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.384 0.128 20.607);
--primary-foreground: oklch(0.892 0.041 11.113);
--secondary: oklch(0.399 0.141 348.695);
--secondary-foreground: oklch(0.897 0.049 341.427);
--accent: oklch(0.437 0.094 51.287);
--accent-foreground: oklch(0.918 0.031 55.974);
--destructive: oklch(0.332 0.121 33.565);
--destructive-foreground: oklch(0.817 0.104 31.816);
--ring: oklch(0.384 0.128 20.607);
--chart-1: oklch(0.384 0.128 20.607);
--chart-2: oklch(0.399 0.141 348.695);
--chart-3: oklch(0.437 0.094 51.287);
--chart-4: oklch(0.427 0.152 348.827);
--chart-5: oklch(0.386 0.133 21.205);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.134 0.02 11.966);
--foreground: oklch(1 0 180);
--muted: oklch(0.258 0.037 343.251);
--muted-foreground: oklch(0.779 0.006 340.408);
--popover: oklch(0.147 0.024 12.84);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.147 0.024 12.84);
--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.384 0.128 20.607);
--primary-foreground: oklch(0.892 0.041 11.113);
--secondary: oklch(0.399 0.141 348.695);
--secondary-foreground: oklch(0.897 0.049 341.427);
--accent: oklch(0.437 0.094 51.287);
--accent-foreground: oklch(0.918 0.031 55.974);
--destructive: oklch(0.673 0.216 33.151);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.384 0.128 20.607);
--chart-1: oklch(0.384 0.128 20.607);
--chart-2: oklch(0.399 0.141 348.695);
--chart-3: oklch(0.437 0.094 51.287);
--chart-4: oklch(0.427 0.152 348.827);
--chart-5: oklch(0.386 0.133 21.205);
}