Mild is a shadcn/ui theme built around a green primary color (#26c047) with red accents (#c04726). The light mode uses a neutral background (#f7fdf8). Dark mode keeps the green primary (#26c047) on a neutral background (#020302).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fdf8mintcream | #020302black |
| Foreground | #020903black | #ffffffwhite |
| Card | #f3fcf5mintcream | #030704black |
| Card foreground | #010402black | #ffffffwhite |
| Popover | #f7fdf8mintcream | #020302black |
| Popover foreground | #020903black | #ffffffwhite |
| Primary | #26c047limegreen | #26c047limegreen |
| Primary foreground | #041508black | #041508black |
| Secondary | #4726c0rebeccapurple | #4726c0rebeccapurple |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dad7e5gainsboro | #1d1a28black |
| Muted foreground | #5b576bdimgray | #9994a8darkgray |
| Accent | #c04726sienna | #c04726sienna |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #b81800firebrick | #ff3d1forangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #26c047limegreen | #26c047limegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.50:1 | AAA |
| Text on card | 19.63:1 | AAA |
| Primary button | 7.77:1 | AAA |
| Secondary button | 9.11:1 | AAA |
| Muted text | 4.89:1 | AA |
| Accent | 5.04:1 | AA |
| Destructive | 6.63:1 | AA |
| Text on background | 20.62:1 | AAA |
| Text on card | 20.27:1 | AAA |
| Primary button | 7.77:1 | AAA |
| Secondary button | 9.11:1 | AAA |
| Muted text | 5.81:1 | AA |
| Accent | 5.04:1 | AA |
| Destructive | 3.54:1 | AA Large |
Paste this into your globals.css to use Mild in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.009 152.481);
--foreground: oklch(0.124 0.024 151.656);
--muted: oklch(0.885 0.02 295.916);
--muted-foreground: oklch(0.469 0.031 295.094);
--popover: oklch(0.988 0.009 152.481);
--popover-foreground: oklch(0.124 0.024 151.656);
--card: oklch(0.982 0.013 152.411);
--card-foreground: oklch(0.098 0.019 151.656);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.706 0.203 145.975);
--primary-foreground: oklch(0.177 0.037 149.942);
--secondary: oklch(0.427 0.218 281.878);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.559 0.162 35.988);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.499 0.193 31.234);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.706 0.203 145.975);
--chart-1: oklch(0.706 0.203 145.975);
--chart-2: oklch(0.427 0.218 281.878);
--chart-3: oklch(0.559 0.162 35.988);
--chart-4: oklch(0.447 0.23 281.731);
--chart-5: oklch(0.715 0.209 145.752);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.095 0.01 152.115);
--foreground: oklch(1 0 180);
--muted: oklch(0.228 0.028 293.985);
--muted-foreground: oklch(0.678 0.029 295.557);
--popover: oklch(0.095 0.01 152.115);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.12 0.013 152.115);
--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.706 0.203 145.975);
--primary-foreground: oklch(0.177 0.037 149.942);
--secondary: oklch(0.427 0.218 281.878);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.559 0.162 35.988);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.654 0.233 31.599);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.706 0.203 145.975);
--chart-1: oklch(0.706 0.203 145.975);
--chart-2: oklch(0.427 0.218 281.878);
--chart-3: oklch(0.559 0.162 35.988);
--chart-4: oklch(0.447 0.23 281.731);
--chart-5: oklch(0.715 0.209 145.752);
}