Medium is a shadcn/ui theme built around a vivid red primary color (#ec7486) with vivid teal accents (#74ecda). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid red primary (#ec7486) on a neutral background (#040101).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #040101black |
| Foreground | #040101black | #faf4f5whitesmoke |
| Card | #fcfcfcsnow | #080203black |
| Card foreground | #000000black | #fcf8f9snow |
| Popover | #ffffffwhite | #040101black |
| Popover foreground | #040101black | #faf4f5whitesmoke |
| Primary | #ec7486lightcoral | #ec7486lightcoral |
| Primary foreground | #28060bblack | #28060bblack |
| Secondary | #74ecdaaquamarine | #74ecdaaquamarine |
| Secondary foreground | #062823black | #062823black |
| Muted | #e9f1f0whitesmoke | #0e1615black |
| Muted foreground | #505857darkslategray | #a7afaedarkgray |
| Accent | #74ecdaaquamarine | #74ecdaaquamarine |
| Accent foreground | #062823black | #062823black |
| Destructive | #791406maroon | #e4250corangered |
| Destructive foreground | #fbbeb6lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ec7486lightcoral | #ec7486lightcoral |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.79:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 6.60:1 | AA |
| Secondary button | 11.04:1 | AAA |
| Muted text | 6.37:1 | AA |
| Accent | 11.04:1 | AAA |
| Destructive | 6.85:1 | AA |
| Text on background | 19.12:1 | AAA |
| Text on card | 19.52:1 | AAA |
| Primary button | 6.60:1 | AA |
| Secondary button | 11.04:1 | AAA |
| Muted text | 8.20:1 | AAA |
| Accent | 11.04:1 | AAA |
| Destructive | 4.60:1 | AA |
Paste this into your globals.css to use Medium in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.081 0.017 7.574);
--muted: oklch(0.952 0.009 186.358);
--muted-foreground: oklch(0.454 0.011 185.982);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.081 0.017 7.574);
--card: oklch(0.992 0 161.565);
--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.703 0.149 12.305);
--primary-foreground: oklch(0.189 0.059 15.228);
--secondary: oklch(0.869 0.112 182.551);
--secondary-foreground: oklch(0.252 0.04 180.932);
--accent: oklch(0.869 0.112 182.551);
--accent-foreground: oklch(0.252 0.04 180.932);
--destructive: oklch(0.374 0.137 31.113);
--destructive-foreground: oklch(0.856 0.071 27.222);
--ring: oklch(0.703 0.149 12.305);
--chart-1: oklch(0.703 0.149 12.305);
--chart-2: oklch(0.869 0.112 182.551);
--chart-3: oklch(0.869 0.112 182.551);
--chart-4: oklch(0.879 0.104 183.036);
--chart-5: oklch(0.702 0.154 12.581);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.082 0.015 7.422);
--foreground: oklch(0.973 0.006 6.759);
--muted: oklch(0.191 0.013 184.828);
--muted-foreground: oklch(0.747 0.01 186.266);
--popover: oklch(0.082 0.015 7.422);
--popover-foreground: oklch(0.973 0.006 6.759);
--card: oklch(0.104 0.019 7.422);
--card-foreground: oklch(0.982 0.004 6.703);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.703 0.149 12.305);
--primary-foreground: oklch(0.189 0.059 15.228);
--secondary: oklch(0.869 0.112 182.551);
--secondary-foreground: oklch(0.252 0.04 180.932);
--accent: oklch(0.869 0.112 182.551);
--accent-foreground: oklch(0.252 0.04 180.932);
--destructive: oklch(0.589 0.224 30.828);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.703 0.149 12.305);
--chart-1: oklch(0.703 0.149 12.305);
--chart-2: oklch(0.869 0.112 182.551);
--chart-3: oklch(0.869 0.112 182.551);
--chart-4: oklch(0.879 0.104 183.036);
--chart-5: oklch(0.702 0.154 12.581);
}