Opposite is a shadcn/ui theme built around a deep pink primary color (#691b42) with deep red accents (#691b1b). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep pink primary (#691b42) on a pink-tinted background (#0e060a).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0e060ablack |
| Foreground | #15050dblack | #f9f5f7whitesmoke |
| Card | #fcfcfcsnow | #12080dblack |
| Card foreground | #10040ablack | #fbf9fasnow |
| Popover | #fcfcfcsnow | #12080dblack |
| Popover foreground | #10040ablack | #fbf9fasnow |
| Primary | #691b42brown | #691b42brown |
| Primary foreground | #f0c6dbpink | #f0c6dbpink |
| Secondary | #691b69purple | #691b69purple |
| Secondary foreground | #f0c6f0thistle | #f0c6f0thistle |
| Muted | #f1dff1lavender | #200e20black |
| Muted foreground | #5b495bdimgray | #b6a4b6darkgray |
| Accent | #691b1bmaroon | #691b1bmaroon |
| Accent foreground | #f0c6c6pink | #f0c6c6pink |
| Destructive | #681608maroon | #f04f33tomato |
| Destructive foreground | #f9b5aalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #691b42brown | #691b42brown |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.82:1 | AAA |
| Text on card | 19.68:1 | AAA |
| Primary button | 7.48:1 | AAA |
| Secondary button | 7.12:1 | AAA |
| Muted text | 6.50:1 | AA |
| Accent | 7.63:1 | AAA |
| Destructive | 7.13:1 | AAA |
| Text on background | 18.49:1 | AAA |
| Text on card | 18.81:1 | AAA |
| Primary button | 7.48:1 | AAA |
| Secondary button | 7.12:1 | AAA |
| Muted text | 7.83:1 | AAA |
| Accent | 7.63:1 | AAA |
| Destructive | 3.57:1 | AA Large |
Paste this into your globals.css to use Opposite in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.147 0.034 348.937);
--muted: oklch(0.924 0.03 325.816);
--muted-foreground: oklch(0.429 0.037 326.201);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.134 0.03 347.195);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.134 0.03 347.195);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.364 0.117 353.909);
--primary-foreground: oklch(0.87 0.055 346.719);
--secondary: oklch(0.384 0.145 327.959);
--secondary-foreground: oklch(0.876 0.073 326.178);
--accent: oklch(0.353 0.111 24.903);
--accent-foreground: oklch(0.864 0.048 18.122);
--destructive: oklch(0.343 0.118 32.343);
--destructive-foreground: oklch(0.834 0.08 30.122);
--ring: oklch(0.364 0.117 353.909);
--chart-1: oklch(0.364 0.117 353.909);
--chart-2: oklch(0.384 0.145 327.959);
--chart-3: oklch(0.353 0.111 24.903);
--chart-4: oklch(0.414 0.158 327.979);
--chart-5: oklch(0.365 0.122 354.395);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.017 346.525);
--foreground: oklch(0.975 0.005 345.282);
--muted: oklch(0.199 0.043 327.028);
--muted-foreground: oklch(0.741 0.032 325.899);
--popover: oklch(0.151 0.02 347.961);
--popover-foreground: oklch(0.983 0.003 345.235);
--card: oklch(0.151 0.02 347.961);
--card-foreground: oklch(0.983 0.003 345.235);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.364 0.117 353.909);
--primary-foreground: oklch(0.87 0.055 346.719);
--secondary: oklch(0.384 0.145 327.959);
--secondary-foreground: oklch(0.876 0.073 326.178);
--accent: oklch(0.353 0.111 24.903);
--accent-foreground: oklch(0.864 0.048 18.122);
--destructive: oklch(0.647 0.201 32.368);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.364 0.117 353.909);
--chart-1: oklch(0.364 0.117 353.909);
--chart-2: oklch(0.384 0.145 327.959);
--chart-3: oklch(0.353 0.111 24.903);
--chart-4: oklch(0.414 0.158 327.979);
--chart-5: oklch(0.365 0.122 354.395);
}