Contagion is a shadcn/ui theme built around a light blue primary color (#ecf2f8) with light green accents (#f2f8ec). The light mode uses a neutral background (#f7fafd). Dark mode keeps the light blue primary (#ecf2f8) on a blue-tinted background (#050a0f).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fafdghostwhite | #050a0fblack |
| Foreground | #020508black | #f6f7f9whitesmoke |
| Card | #f7fafdghostwhite | #050a0fblack |
| Card foreground | #020508black | #f6f7f9whitesmoke |
| Popover | #f7fafdghostwhite | #050a0fblack |
| Popover foreground | #020508black | #f6f7f9whitesmoke |
| Primary | #ecf2f8whitesmoke | #ecf2f8whitesmoke |
| Primary foreground | #2e5984darkslateblue | #2e5984darkslateblue |
| Secondary | #f8ecf2lavenderblush | #f8ecf2lavenderblush |
| Secondary foreground | #842e59brown | #842e59brown |
| Muted | #e7dae0gainsboro | #25181fblack |
| Muted foreground | #65535cdimgray | #ac9aa3darkgray |
| Accent | #f2f8echoneydew | #f2f8echoneydew |
| Accent foreground | #263914darkgreen | #263914darkgreen |
| Destructive | #741106maroon | #f3311borangered |
| Destructive foreground | #fbb9b1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ecf2f8whitesmoke | #ecf2f8whitesmoke |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.48:1 | AAA |
| Text on card | 19.48:1 | AAA |
| Primary button | 6.48:1 | AA |
| Secondary button | 7.27:1 | AAA |
| Muted text | 5.25:1 | AA |
| Accent | 11.60:1 | AAA |
| Destructive | 6.92:1 | AA |
| Text on background | 18.51:1 | AAA |
| Text on card | 18.51:1 | AAA |
| Primary button | 6.48:1 | AA |
| Secondary button | 7.27:1 | AAA |
| Muted text | 6.43:1 | AA |
| Accent | 11.60:1 | AAA |
| Destructive | 3.98:1 | AA Large |
Paste this into your globals.css to use Contagion in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.006 247.882);
--foreground: oklch(0.112 0.014 238.891);
--muted: oklch(0.9 0.017 345.637);
--muted-foreground: oklch(0.462 0.028 346.658);
--popover: oklch(0.983 0.006 247.882);
--popover-foreground: oklch(0.112 0.014 238.891);
--card: oklch(0.983 0.006 247.882);
--card-foreground: oklch(0.112 0.014 238.891);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.959 0.011 247.936);
--primary-foreground: oklch(0.455 0.085 250.216);
--secondary: oklch(0.955 0.015 345.561);
--secondary-foreground: oklch(0.441 0.126 352.524);
--accent: oklch(0.972 0.017 128.661);
--accent-foreground: oklch(0.317 0.063 131.308);
--destructive: oklch(0.362 0.134 30.649);
--destructive-foreground: oklch(0.844 0.078 26.007);
--ring: oklch(0.959 0.011 247.936);
--chart-1: oklch(0.959 0.011 247.936);
--chart-2: oklch(0.955 0.015 345.561);
--chart-3: oklch(0.972 0.017 128.661);
--chart-4: oklch(0.982 0.006 345.306);
--chart-5: oklch(0.959 0.011 247.943);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.142 0.015 244.338);
--foreground: oklch(0.976 0.003 247.849);
--muted: oklch(0.228 0.025 347.776);
--muted-foreground: oklch(0.705 0.025 346.048);
--popover: oklch(0.142 0.015 244.338);
--popover-foreground: oklch(0.976 0.003 247.849);
--card: oklch(0.142 0.015 244.338);
--card-foreground: oklch(0.976 0.003 247.849);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.959 0.011 247.936);
--primary-foreground: oklch(0.455 0.085 250.216);
--secondary: oklch(0.955 0.015 345.561);
--secondary-foreground: oklch(0.441 0.126 352.524);
--accent: oklch(0.972 0.017 128.661);
--accent-foreground: oklch(0.317 0.063 131.308);
--destructive: oklch(0.625 0.23 30.518);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.959 0.011 247.936);
--chart-1: oklch(0.959 0.011 247.936);
--chart-2: oklch(0.955 0.015 345.561);
--chart-3: oklch(0.972 0.017 128.661);
--chart-4: oklch(0.982 0.006 345.306);
--chart-5: oklch(0.959 0.011 247.943);
}