Milk is a shadcn/ui theme built around a vivid green primary color (#74f740) with vivid violet accents (#c340f7). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#74f740) on a green-tinted background (#081004).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #081004black |
| Foreground | #060c03black | #fcfdfcwhite |
| Card | #ffffffwhite | #081004black |
| Card foreground | #060c03black | #fcfdfcwhite |
| Popover | #ffffffwhite | #081004black |
| Popover foreground | #060c03black | #fcfdfcwhite |
| Primary | #74f740yellowgreen | #74f740yellowgreen |
| Primary foreground | #020500black | #020500black |
| Secondary | #c340f7mediumorchid | #c340f7mediumorchid |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e3d9e7gainsboro | #221826black |
| Muted foreground | #5b555edimgray | #a8a1aadarkgray |
| Accent | #c340f7mediumorchid | #c340f7mediumorchid |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #9d3b10saddlebrown | #e86026chocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #74f740yellowgreen | #74f740yellowgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.78:1 | AAA |
| Text on card | 19.78:1 | AAA |
| Primary button | 14.76:1 | AAA |
| Secondary button | 3.88:1 | AA Large |
| Muted text | 5.30:1 | AA |
| Accent | 3.88:1 | AA Large |
| Destructive | 6.86:1 | AA |
| Text on background | 18.97:1 | AAA |
| Text on card | 18.97:1 | AAA |
| Primary button | 14.76:1 | AAA |
| Secondary button | 3.88:1 | AA Large |
| Muted text | 6.83:1 | AA |
| Accent | 3.88:1 | AA Large |
| Destructive | 6.15:1 | AA |
Paste this into your globals.css to use Milk in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.144 0.027 134.913);
--muted: oklch(0.899 0.022 316.538);
--muted-foreground: oklch(0.458 0.016 316.504);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.144 0.027 134.913);
--card: oklch(1 0 180);
--card-foreground: oklch(0.144 0.027 134.913);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.869 0.244 138.605);
--primary-foreground: oklch(0.103 0.027 133.955);
--secondary: oklch(0.638 0.264 314.214);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.638 0.264 314.214);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.483 0.141 40.257);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.869 0.244 138.605);
--chart-1: oklch(0.869 0.244 138.605);
--chart-2: oklch(0.638 0.264 314.214);
--chart-3: oklch(0.638 0.264 314.214);
--chart-4: oklch(0.658 0.25 314.684);
--chart-5: oklch(0.875 0.249 138.699);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.16 0.028 135.686);
--foreground: oklch(0.993 0.002 136.616);
--muted: oklch(0.226 0.03 316.201);
--muted-foreground: oklch(0.718 0.015 316.549);
--popover: oklch(0.16 0.028 135.686);
--popover-foreground: oklch(0.993 0.002 136.616);
--card: oklch(0.16 0.028 135.686);
--card-foreground: oklch(0.993 0.002 136.616);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.869 0.244 138.605);
--primary-foreground: oklch(0.103 0.027 133.955);
--secondary: oklch(0.638 0.264 314.214);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.638 0.264 314.214);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.655 0.182 40.941);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.869 0.244 138.605);
--chart-1: oklch(0.869 0.244 138.605);
--chart-2: oklch(0.638 0.264 314.214);
--chart-3: oklch(0.638 0.264 314.214);
--chart-4: oklch(0.658 0.25 314.684);
--chart-5: oklch(0.875 0.249 138.699);
}