Cooperative for shadcn/ui

Cooperative is a shadcn/ui theme built around a muted light purple primary color (#d3b6d2) with muted light pink accents (#d3b6c3). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the muted light purple primary (#d3b6d2) on a purple-tinted background (#0c030c).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#0c030cblack
Foreground
#0c040bblack
#faf5f9whitesmoke
Card
#fbf4fbghostwhite
#100410black
Card foreground
#080208black
#fbf8fbsnow
Popover
#fcf8fcsnow
#0c030cblack
Popover foreground
#0c040bblack
#faf5f9whitesmoke
Primary
#d3b6d2thistle
#d3b6d2thistle
Primary foreground
#362135darkslategray
#362135darkslategray
Secondary
#c5b6d3thistle
#c5b6d3thistle
Secondary foreground
#2c2136darkslategray
#2c2136darkslategray
Muted
#ebe7eflavender
#151018black
Muted foreground
#424144darkslategray
#bdbbbesilver
Accent
#d3b6c3silver
#d3b6c3silver
Accent foreground
#36212bdarkslategray
#36212bdarkslategray
Destructive
#d12e15firebrick
#ec533ctomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d3b6d2thistle
#d3b6d2thistle

Contrast

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

Light mode
Text on background19.20:1AAA
Text on card18.98:1AAA
Primary button7.97:1AAA
Secondary button7.97:1AAA
Muted text8.27:1AAA
Accent7.96:1AAA
Destructive5.11:1AA
Dark mode
Text on background18.83:1AAA
Text on card19.00:1AAA
Primary button7.97:1AAA
Secondary button7.97:1AAA
Muted text9.82:1AAA
Accent7.96:1AAA
Destructive3.57:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.008 326.608);
  --foreground: oklch(0.125 0.027 328.008);
  --muted: oklch(0.932 0.012 309.659);
  --muted-foreground: oklch(0.378 0.005 309.658);
  --popover: oklch(0.983 0.008 326.608);
  --popover-foreground: oklch(0.125 0.027 328.008);
  --card: oklch(0.974 0.011 326.642);
  --card-foreground: oklch(0.109 0.024 327.93);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.809 0.051 327.069);
  --primary-foreground: oklch(0.282 0.048 327.904);
  --secondary: oklch(0.798 0.044 309.238);
  --secondary-foreground: oklch(0.27 0.042 308.196);
  --accent: oklch(0.805 0.038 348.146);
  --accent-foreground: oklch(0.277 0.037 350.279);
  --destructive: oklch(0.561 0.202 31.562);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.809 0.051 327.069);
  --chart-1: oklch(0.809 0.051 327.069);
  --chart-2: oklch(0.798 0.044 309.238);
  --chart-3: oklch(0.805 0.038 348.146);
  --chart-4: oklch(0.825 0.038 309.328);
  --chart-5: oklch(0.808 0.057 327.131);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.029 328.127);
  --foreground: oklch(0.975 0.008 326.608);
  --muted: oklch(0.184 0.018 308.831);
  --muted-foreground: oklch(0.795 0.004 309.735);
  --popover: oklch(0.124 0.029 328.127);
  --popover-foreground: oklch(0.975 0.008 326.608);
  --card: oklch(0.138 0.034 328.303);
  --card-foreground: oklch(0.983 0.005 326.585);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.809 0.051 327.069);
  --primary-foreground: oklch(0.282 0.048 327.904);
  --secondary: oklch(0.798 0.044 309.238);
  --secondary-foreground: oklch(0.27 0.042 308.196);
  --accent: oklch(0.805 0.038 348.146);
  --accent-foreground: oklch(0.277 0.037 350.279);
  --destructive: oklch(0.647 0.192 31.4);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.809 0.051 327.069);
  --chart-1: oklch(0.809 0.051 327.069);
  --chart-2: oklch(0.798 0.044 309.238);
  --chart-3: oklch(0.805 0.038 348.146);
  --chart-4: oklch(0.825 0.038 309.328);
  --chart-5: oklch(0.808 0.057 327.131);
}