Cooperative is a shadcn/ui theme built around a muted deep green primary color (#4d5634) with muted deep violet accents (#3c3456). The light mode uses a neutral background (#fcfdf7). Dark mode keeps the muted deep green primary (#4d5634) on a green-tinted background (#0c0d07).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdf7snow | #0c0d07black |
| Foreground | #000000black | #f8f8f6whitesmoke |
| Card | #fafcf2floralwhite | #0f1109black |
| Card foreground | #000000black | #fafbf9snow |
| Popover | #fafcf2floralwhite | #0f1109black |
| Popover foreground | #000000black | #fafbf9snow |
| Primary | #4d5634darkolivegreen | #4d5634darkolivegreen |
| Primary foreground | #e2e6d6gainsboro | #e2e6d6gainsboro |
| Secondary | #3c3456darkslategray | #3c3456darkslategray |
| Secondary foreground | #dad6e6gainsboro | #dad6e6gainsboro |
| Muted | #d8d5e2gainsboro | #201d2ablack |
| Muted foreground | #615f67dimgray | #9a98a0darkgray |
| Accent | #3c3456darkslategray | #3c3456darkslategray |
| Accent foreground | #dad6e6gainsboro | #dad6e6gainsboro |
| Destructive | #cb1710firebrick | #e21912red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4d5634darkolivegreen | #4d5634darkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.53:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 6.11:1 | AA |
| Secondary button | 8.13:1 | AAA |
| Muted text | 4.34:1 | AA Large |
| Accent | 8.13:1 | AAA |
| Destructive | 5.73:1 | AA |
| Text on background | 18.32:1 | AAA |
| Text on card | 18.35:1 | AAA |
| Primary button | 6.11:1 | AA |
| Secondary button | 8.13:1 | AAA |
| Muted text | 5.78:1 | AA |
| Accent | 8.13:1 | AAA |
| Destructive | 4.77:1 | AA |
Paste this into your globals.css to use Cooperative in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.009 117.981);
--foreground: oklch(0 0 0);
--muted: oklch(0.879 0.018 297.465);
--muted-foreground: oklch(0.492 0.013 297.364);
--popover: oklch(0.987 0.013 118.06);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.987 0.013 118.06);
--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.436 0.054 120.117);
--primary-foreground: oklch(0.918 0.023 118.26);
--secondary: oklch(0.349 0.06 294.6);
--secondary-foreground: oklch(0.883 0.023 297.363);
--accent: oklch(0.349 0.06 294.6);
--accent-foreground: oklch(0.883 0.023 297.363);
--destructive: oklch(0.536 0.21 29.045);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.436 0.054 120.117);
--chart-1: oklch(0.436 0.054 120.117);
--chart-2: oklch(0.349 0.06 294.6);
--chart-3: oklch(0.349 0.06 294.6);
--chart-4: oklch(0.374 0.065 294.532);
--chart-5: oklch(0.442 0.06 120.357);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.156 0.014 118.901);
--foreground: oklch(0.979 0.002 117.869);
--muted: oklch(0.241 0.025 295.971);
--muted-foreground: oklch(0.682 0.012 297.519);
--popover: oklch(0.171 0.016 119.463);
--popover-foreground: oklch(0.986 0.002 117.854);
--card: oklch(0.171 0.016 119.463);
--card-foreground: oklch(0.986 0.002 117.854);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.436 0.054 120.117);
--primary-foreground: oklch(0.918 0.023 118.26);
--secondary: oklch(0.349 0.06 294.6);
--secondary-foreground: oklch(0.883 0.023 297.363);
--accent: oklch(0.349 0.06 294.6);
--accent-foreground: oklch(0.883 0.023 297.363);
--destructive: oklch(0.581 0.228 29.086);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.436 0.054 120.117);
--chart-1: oklch(0.436 0.054 120.117);
--chart-2: oklch(0.349 0.06 294.6);
--chart-3: oklch(0.349 0.06 294.6);
--chart-4: oklch(0.374 0.065 294.532);
--chart-5: oklch(0.442 0.06 120.357);
}