Cooperative is a shadcn/ui theme built around a vivid green primary color (#23ad0b) with vivid green accents (#0bad44). The light mode uses a neutral background (#f8fcf8). Dark mode keeps the vivid green primary (#23ad0b) on a neutral background (#040703).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fcf8mintcream | #040703black |
| Foreground | #010401black | #fcfdfcwhite |
| Card | #f8fcf8mintcream | #040703black |
| Card foreground | #010401black | #fcfdfcwhite |
| Popover | #f8fcf8mintcream | #040703black |
| Popover foreground | #010401black | #fcfdfcwhite |
| Primary | #23ad0bforestgreen | #23ad0bforestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #74ad0bolivedrab | #74ad0bolivedrab |
| Secondary foreground | #000000black | #000000black |
| Muted | #ebede8linen | #151712black |
| Muted foreground | #484847darkslategray | #b8b8b7silver |
| Accent | #0bad44seagreen | #0bad44seagreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #c53302firebrick | #fd4508orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #23ad0bforestgreen | #23ad0bforestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.89:1 | AAA |
| Text on card | 19.89:1 | AAA |
| Primary button | 2.99:1 | Fail |
| Secondary button | 7.69:1 | AAA |
| Muted text | 7.76:1 | AAA |
| Accent | 2.98:1 | Fail |
| Destructive | 5.46:1 | AA |
| Text on background | 19.84:1 | AAA |
| Text on card | 19.84:1 | AAA |
| Primary button | 2.99:1 | Fail |
| Secondary button | 7.69:1 | AAA |
| Muted text | 9.11:1 | AAA |
| Accent | 2.98:1 | Fail |
| Destructive | 3.49:1 | AA Large |
Paste this into your globals.css to use Cooperative in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.006 141.051);
--foreground: oklch(0.1 0.023 138.838);
--muted: oklch(0.943 0.006 122.316);
--muted-foreground: oklch(0.401 0.002 122.309);
--popover: oklch(0.987 0.006 141.051);
--popover-foreground: oklch(0.1 0.023 138.838);
--card: oklch(0.987 0.006 141.051);
--card-foreground: oklch(0.1 0.023 138.838);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.65 0.213 141.568);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.681 0.179 129.438);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.651 0.188 147.565);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.543 0.189 35.126);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.65 0.213 141.568);
--chart-1: oklch(0.65 0.213 141.568);
--chart-2: oklch(0.681 0.179 129.438);
--chart-3: oklch(0.651 0.188 147.565);
--chart-4: oklch(0.722 0.19 129.507);
--chart-5: oklch(0.658 0.217 141.639);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.017 139.733);
--foreground: oklch(0.993 0.003 141.059);
--muted: oklch(0.2 0.009 122.934);
--muted-foreground: oklch(0.783 0.002 122.255);
--popover: oklch(0.122 0.017 139.733);
--popover-foreground: oklch(0.993 0.003 141.059);
--card: oklch(0.122 0.017 139.733);
--card-foreground: oklch(0.993 0.003 141.059);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.65 0.213 141.568);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.681 0.179 129.438);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.651 0.188 147.565);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.656 0.227 35.093);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.65 0.213 141.568);
--chart-1: oklch(0.65 0.213 141.568);
--chart-2: oklch(0.681 0.179 129.438);
--chart-3: oklch(0.651 0.188 147.565);
--chart-4: oklch(0.722 0.19 129.507);
--chart-5: oklch(0.658 0.217 141.639);
}