Mad is a shadcn/ui theme built around a vivid yellow primary color (#f9f176) with muted light yellow accents (#cecdc0). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid yellow primary (#f9f176) on a neutral background (#070703).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #070703black |
| Foreground | #0f0f05black | #f9f9f6whitesmoke |
| Card | #ffffffwhite | #070703black |
| Card foreground | #0f0f05black | #f9f9f6whitesmoke |
| Popover | #ffffffwhite | #070703black |
| Popover foreground | #0f0f05black | #f9f9f6whitesmoke |
| Primary | #f9f176khaki | #f9f176khaki |
| Primary foreground | #3b3702darkolivegreen | #3b3702darkolivegreen |
| Secondary | #d7d7d5lightgrey | #1d1d1bblack |
| Secondary foreground | #3f3f3bdarkslategray | #b7b7b3silver |
| Muted | #ebeae0beige | #1f1e14black |
| Muted foreground | #666552dimgray | #adac99darkgray |
| Accent | #cecdc0silver | #2f2e28darkslategray |
| Accent foreground | #333328darkslategray | #c9c8c0silver |
| Destructive | #a70d02darkred | #fd4235tomato |
| Destructive foreground | #ffdedcmistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f9f176khaki | #f9f176khaki |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.25:1 | AAA |
| Text on card | 19.25:1 | AAA |
| Primary button | 10.28:1 | AAA |
| Secondary button | 7.35:1 | AAA |
| Muted text | 4.90:1 | AA |
| Accent | 7.95:1 | AAA |
| Destructive | 6.21:1 | AA |
| Text on background | 19.15:1 | AAA |
| Text on card | 19.15:1 | AAA |
| Primary button | 10.28:1 | AAA |
| Secondary button | 8.40:1 | AAA |
| Muted text | 7.26:1 | AAA |
| Accent | 8.08:1 | AAA |
| Destructive | 3.49:1 | AA Large |
Paste this into your globals.css to use Mad in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.164 0.02 105.21);
--muted: oklch(0.936 0.014 103.354);
--muted-foreground: oklch(0.501 0.029 104.013);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.164 0.02 105.21);
--card: oklch(1 0 180);
--card-foreground: oklch(0.164 0.02 105.21);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.94 0.144 105.124);
--primary-foreground: oklch(0.33 0.068 105.18);
--secondary: oklch(0.879 0.003 103.166);
--secondary-foreground: oklch(0.366 0.006 103.368);
--accent: oklch(0.845 0.017 103.441);
--accent-foreground: oklch(0.317 0.018 103.985);
--destructive: oklch(0.461 0.183 30.017);
--destructive-foreground: oklch(0.927 0.036 22.693);
--ring: oklch(0.94 0.144 105.124);
--chart-1: oklch(0.94 0.144 105.124);
--chart-2: oklch(0.879 0.003 103.166);
--chart-3: oklch(0.845 0.017 103.441);
--chart-4: oklch(0.902 0.003 103.153);
--chart-5: oklch(0.945 0.148 105.144);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.011 105.035);
--foreground: oklch(0.98 0.003 103.165);
--muted: oklch(0.234 0.019 104.347);
--muted-foreground: oklch(0.74 0.026 103.685);
--popover: oklch(0.125 0.011 105.035);
--popover-foreground: oklch(0.98 0.003 103.165);
--card: oklch(0.125 0.011 105.035);
--card-foreground: oklch(0.98 0.003 103.165);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.94 0.144 105.124);
--primary-foreground: oklch(0.33 0.068 105.18);
--secondary: oklch(0.229 0.003 103.323);
--secondary-foreground: oklch(0.778 0.006 103.231);
--accent: oklch(0.301 0.011 103.716);
--accent-foreground: oklch(0.832 0.012 103.347);
--destructive: oklch(0.657 0.224 28.88);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.94 0.144 105.124);
--chart-1: oklch(0.94 0.144 105.124);
--chart-2: oklch(0.229 0.003 103.323);
--chart-3: oklch(0.301 0.011 103.716);
--chart-4: oklch(0.262 0.004 103.339);
--chart-5: oklch(0.945 0.148 105.144);
}