Switch is a shadcn/ui theme built around a light pink primary color (#faf4f6) with light teal accents (#f4faf9). The light mode uses a neutral background (#ffffff). Dark mode keeps the light pink primary (#faf4f6) on a neutral background (#070304).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #070304black |
| Foreground | #0e0205black | #fbf9f9snow |
| Card | #fcfcfcsnow | #0a0506black |
| Card foreground | #090103black | #fdfcfcsnow |
| Popover | #ffffffwhite | #070304black |
| Popover foreground | #0e0205black | #fbf9f9snow |
| Primary | #faf4f6whitesmoke | #faf4f6whitesmoke |
| Primary foreground | #833a4dsienna | #833a4dsienna |
| Secondary | #f4faf9mintcream | #f4faf9mintcream |
| Secondary foreground | #1a3c33darkslategray | #1a3c33darkslategray |
| Muted | #dff1eclavender | #0e201bblack |
| Muted foreground | #575b5adimgray | #a4a8a7darkgray |
| Accent | #f4faf9mintcream | #f4faf9mintcream |
| Accent foreground | #1a3c33darkslategray | #1a3c33darkslategray |
| Destructive | #cc1800firebrick | #eb1b00red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #faf4f6whitesmoke | #faf4f6whitesmoke |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.39:1 | AAA |
| Text on card | 20.19:1 | AAA |
| Primary button | 7.24:1 | AAA |
| Secondary button | 11.47:1 | AAA |
| Muted text | 5.87:1 | AA |
| Accent | 11.47:1 | AAA |
| Destructive | 5.68:1 | AA |
| Text on background | 19.52:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 7.24:1 | AAA |
| Secondary button | 11.47:1 | AAA |
| Muted text | 7.05:1 | AAA |
| Accent | 11.47:1 | AAA |
| Destructive | 4.48:1 | AA Large |
Paste this into your globals.css to use Switch in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.115 0.033 359.151);
--muted: oklch(0.943 0.019 178.181);
--muted-foreground: oklch(0.468 0.005 178.488);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.115 0.033 359.151);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.1 0.029 358.519);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.973 0.007 358.98);
--primary-foreground: oklch(0.45 0.103 5.394);
--secondary: oklch(0.981 0.007 178.588);
--secondary-foreground: oklch(0.329 0.043 173.968);
--accent: oklch(0.981 0.007 178.588);
--accent-foreground: oklch(0.329 0.043 173.968);
--destructive: oklch(0.538 0.211 30.743);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.973 0.007 358.98);
--chart-1: oklch(0.973 0.007 358.98);
--chart-2: oklch(0.981 0.007 178.588);
--chart-3: oklch(0.981 0.007 178.588);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.973 0.007 358.995);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.109 0.011 358.694);
--foreground: oklch(0.983 0.003 358.867);
--muted: oklch(0.225 0.025 174.902);
--muted-foreground: oklch(0.727 0.004 178.614);
--popover: oklch(0.109 0.011 358.694);
--popover-foreground: oklch(0.983 0.003 358.867);
--card: oklch(0.125 0.013 358.695);
--card-foreground: oklch(0.992 0.001 358.825);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.973 0.007 358.98);
--primary-foreground: oklch(0.45 0.103 5.394);
--secondary: oklch(0.981 0.007 178.588);
--secondary-foreground: oklch(0.329 0.043 173.968);
--accent: oklch(0.981 0.007 178.588);
--accent-foreground: oklch(0.329 0.043 173.968);
--destructive: oklch(0.597 0.235 30.6);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.973 0.007 358.98);
--chart-1: oklch(0.973 0.007 358.98);
--chart-2: oklch(0.981 0.007 178.588);
--chart-3: oklch(0.981 0.007 178.588);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.973 0.007 358.995);
}