Alfalfa is a shadcn/ui theme built around a vivid deep orange primary color (#341504) with vivid deep violet accents (#150434). The light mode uses a neutral background (#fefcfb). Dark mode keeps the vivid deep orange primary (#341504) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fefcfbsnow | #000000black |
| Foreground | #040201black | #ffffffwhite |
| Card | #fdf9f7snow | #030303black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fdf9f7snow | #030303black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #341504black | #341504black |
| Primary foreground | #f5a275lightsalmon | #f5a275lightsalmon |
| Secondary | #043415darkgreen | #043415darkgreen |
| Secondary foreground | #15ef61springgreen | #15ef61springgreen |
| Muted | #e0ebe4gainsboro | #141f18black |
| Muted foreground | #3d4c43darkslategray | #b3c2b8silver |
| Accent | #150434black | #150434black |
| Accent foreground | #e2d4fclavender | #e2d4fclavender |
| Destructive | #893606saddlebrown | #f5600aorangered |
| Destructive foreground | #fdd9c4bisque | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #341504black | #341504black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.24:1 | AAA |
| Text on card | 20.06:1 | AAA |
| Primary button | 8.21:1 | AAA |
| Secondary button | 8.94:1 | AAA |
| Muted text | 7.43:1 | AAA |
| Accent | 13.71:1 | AAA |
| Destructive | 6.13:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 8.21:1 | AAA |
| Secondary button | 8.94:1 | AAA |
| Muted text | 9.12:1 | AAA |
| Accent | 13.71:1 | AAA |
| Destructive | 6.56:1 | AA |
Paste this into your globals.css to use Alfalfa in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.002 50.628);
--foreground: oklch(0.091 0.009 58.275);
--muted: oklch(0.93 0.016 157.618);
--muted-foreground: oklch(0.402 0.025 156.586);
--popover: oklch(0.985 0.005 50.596);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.985 0.005 50.596);
--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.239 0.058 47.483);
--primary-foreground: oklch(0.785 0.116 48.764);
--secondary: oklch(0.287 0.075 149.934);
--secondary-foreground: oklch(0.831 0.239 147.655);
--accent: oklch(0.181 0.089 291.648);
--accent-foreground: oklch(0.894 0.056 301.227);
--destructive: oklch(0.443 0.125 43.89);
--destructive-foreground: oklch(0.91 0.049 51.897);
--ring: oklch(0.239 0.058 47.483);
--chart-1: oklch(0.239 0.058 47.483);
--chart-2: oklch(0.287 0.075 149.934);
--chart-3: oklch(0.181 0.089 291.648);
--chart-4: oklch(0.335 0.09 149.219);
--chart-5: oklch(0.24 0.06 47.554);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.227 0.022 155.71);
--muted-foreground: oklch(0.799 0.022 157.407);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.092 0 180);
--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.239 0.058 47.483);
--primary-foreground: oklch(0.785 0.116 48.764);
--secondary: oklch(0.287 0.075 149.934);
--secondary-foreground: oklch(0.831 0.239 147.655);
--accent: oklch(0.181 0.089 291.648);
--accent-foreground: oklch(0.894 0.056 301.227);
--destructive: oklch(0.673 0.198 42.468);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.239 0.058 47.483);
--chart-1: oklch(0.239 0.058 47.483);
--chart-2: oklch(0.287 0.075 149.934);
--chart-3: oklch(0.181 0.089 291.648);
--chart-4: oklch(0.335 0.09 149.219);
--chart-5: oklch(0.24 0.06 47.554);
}