Opposition is a shadcn/ui theme built around a muted cyan primary color (#97bbc3) with muted red accents (#c3a097). The light mode uses a neutral background (#f8fbfc). Dark mode keeps the muted cyan primary (#97bbc3) on a cyan-tinted background (#030a0c).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fbfcghostwhite | #030a0cblack |
| Foreground | #030a0cblack | #fcfdfdwhite |
| Card | #f4f9famintcream | #040e10black |
| Card foreground | #020708black | #ffffffwhite |
| Popover | #f8fbfcghostwhite | #030a0cblack |
| Popover foreground | #030a0cblack | #fcfdfdwhite |
| Primary | #97bbc3darkgray | #97bbc3darkgray |
| Primary foreground | #0f181ablack | #0f181ablack |
| Secondary | #c3a097rosybrown | #c3a097rosybrown |
| Secondary foreground | #1a110fblack | #1a110fblack |
| Muted | #f4edeclinen | #130d0bblack |
| Muted foreground | #6e5d59dimgray | #a69591rosybrown |
| Accent | #c3a097rosybrown | #c3a097rosybrown |
| Accent foreground | #1a110fblack | #1a110fblack |
| Destructive | #b10c06firebrick | #e20f08red |
| Destructive foreground | #feeceblinen | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #97bbc3darkgray | #97bbc3darkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.19:1 | AAA |
| Text on card | 19.12:1 | AAA |
| Primary button | 8.74:1 | AAA |
| Secondary button | 7.80:1 | AAA |
| Muted text | 5.39:1 | AA |
| Accent | 7.80:1 | AAA |
| Destructive | 6.28:1 | AA |
| Text on background | 19.54:1 | AAA |
| Text on card | 19.53:1 | AAA |
| Primary button | 8.74:1 | AAA |
| Secondary button | 7.80:1 | AAA |
| Muted text | 6.72:1 | AA |
| Accent | 7.80:1 | AAA |
| Destructive | 4.85:1 | AA |
Paste this into your globals.css to use Opposition in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.986 0.004 214.327);
--foreground: oklch(0.138 0.014 211.092);
--muted: oklch(0.952 0.007 34.305);
--muted-foreground: oklch(0.494 0.024 34.331);
--popover: oklch(0.986 0.004 214.327);
--popover-foreground: oklch(0.138 0.014 211.092);
--card: oklch(0.979 0.006 214.332);
--card-foreground: oklch(0.12 0.012 210.275);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.768 0.04 214.62);
--primary-foreground: oklch(0.2 0.014 214.823);
--secondary: oklch(0.736 0.044 34.36);
--secondary-foreground: oklch(0.189 0.016 34.443);
--accent: oklch(0.736 0.044 34.36);
--accent-foreground: oklch(0.189 0.016 34.443);
--destructive: oklch(0.482 0.192 29.284);
--destructive-foreground: oklch(0.957 0.02 19.904);
--ring: oklch(0.768 0.04 214.62);
--chart-1: oklch(0.768 0.04 214.62);
--chart-2: oklch(0.736 0.044 34.36);
--chart-3: oklch(0.736 0.044 34.36);
--chart-4: oklch(0.761 0.039 34.338);
--chart-5: oklch(0.77 0.044 214.677);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.138 0.015 211.049);
--foreground: oklch(0.993 0.001 214.32);
--muted: oklch(0.167 0.011 34.382);
--muted-foreground: oklch(0.684 0.022 34.303);
--popover: oklch(0.138 0.015 211.049);
--popover-foreground: oklch(0.993 0.001 214.32);
--card: oklch(0.154 0.017 213.226);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.768 0.04 214.62);
--primary-foreground: oklch(0.2 0.014 214.823);
--secondary: oklch(0.736 0.044 34.36);
--secondary-foreground: oklch(0.189 0.016 34.443);
--accent: oklch(0.736 0.044 34.36);
--accent-foreground: oklch(0.189 0.016 34.443);
--destructive: oklch(0.578 0.232 29.297);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.768 0.04 214.62);
--chart-1: oklch(0.768 0.04 214.62);
--chart-2: oklch(0.736 0.044 34.36);
--chart-3: oklch(0.736 0.044 34.36);
--chart-4: oklch(0.761 0.039 34.338);
--chart-5: oklch(0.77 0.044 214.677);
}