Cooperative for shadcn/ui

Cooperative is a shadcn/ui theme built around a light green primary color (#d7dfbe) with light purple accents (#dfbed7). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#d7dfbe) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#070902black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#030401black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#070902black
#ffffffwhite
Primary
#d7dfbelightgrey
#d7dfbelightgrey
Primary foreground
#3f4823darkolivegreen
#3f4823darkolivegreen
Secondary
#bed7dfpowderblue
#bed7dfpowderblue
Secondary foreground
#233f48darkslategray
#233f48darkslategray
Muted
#f0f4f5whitesmoke
#0a0e0fblack
Muted foreground
#3f4c50darkslategray
#afbcc0silver
Accent
#dfbed7thistle
#dfbed7thistle
Accent foreground
#48233fdarkslategray
#48233fdarkslategray
Destructive
#d82303firebrick
#fc4322orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d7dfbelightgrey
#d7dfbelightgrey

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background20.01:1AAA
Text on card20.11:1AAA
Primary button7.02:1AAA
Secondary button7.46:1AAA
Muted text8.00:1AAA
Accent7.86:1AAA
Destructive5.04:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button7.02:1AAA
Secondary button7.46:1AAA
Muted text9.94:1AAA
Accent7.86:1AAA
Destructive3.53:1AA Large

CSS variables

Paste this into your globals.css to use Cooperative in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.131 0.022 117.44);
  --muted: oklch(0.963 0.004 217.768);
  --muted-foreground: oklch(0.406 0.018 218.12);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.131 0.022 117.44);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.104 0.017 117.44);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.889 0.045 117.986);
  --primary-foreground: oklch(0.383 0.057 119.959);
  --secondary: oklch(0.864 0.029 217.999);
  --secondary-foreground: oklch(0.35 0.037 219.37);
  --accent: oklch(0.838 0.05 334.179);
  --accent-foreground: oklch(0.318 0.069 336.475);
  --destructive: oklch(0.566 0.216 31.482);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.889 0.045 117.986);
  --chart-1: oklch(0.889 0.045 117.986);
  --chart-2: oklch(0.864 0.029 217.999);
  --chart-3: oklch(0.838 0.05 334.179);
  --chart-4: oklch(0.886 0.024 217.941);
  --chart-5: oklch(0.892 0.049 118.061);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.16 0.006 218.071);
  --muted-foreground: oklch(0.787 0.016 217.874);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.889 0.045 117.986);
  --primary-foreground: oklch(0.383 0.057 119.959);
  --secondary: oklch(0.864 0.029 217.999);
  --secondary-foreground: oklch(0.35 0.037 219.37);
  --accent: oklch(0.838 0.05 334.179);
  --accent-foreground: oklch(0.318 0.069 336.475);
  --destructive: oklch(0.654 0.225 32.277);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.889 0.045 117.986);
  --chart-1: oklch(0.889 0.045 117.986);
  --chart-2: oklch(0.864 0.029 217.999);
  --chart-3: oklch(0.838 0.05 334.179);
  --chart-4: oklch(0.886 0.024 217.941);
  --chart-5: oklch(0.892 0.049 118.061);
}