Contributor for shadcn/ui

Contributor is a shadcn/ui theme built around a neutral gray primary color (#3a3836) with neutral gray accents (#38363a). The light mode uses a neutral background (#fefcfb). Dark mode keeps the neutral gray primary (#3a3836) on a neutral background (#080502).

Color palette

TokenLightDark
Background
#fefcfbsnow
#080502black
Foreground
#0d0702black
#fdfcfcsnow
Card
#fdfaf7snow
#0c0703black
Card foreground
#090501black
#ffffffwhite
Popover
#fefcfbsnow
#080502black
Popover foreground
#0d0702black
#fdfcfcsnow
Primary
#3a3836darkslategray
#3a3836darkslategray
Primary foreground
#d3d1cflightgrey
#d3d1cflightgrey
Secondary
#363a38darkslategray
#363a38darkslategray
Secondary foreground
#cfd3d1lightgrey
#cfd3d1lightgrey
Muted
#d3ded8gainsboro
#212c26darkslategray
Muted foreground
#5c7065dimgray
#8fa398darkseagreen
Accent
#38363adarkslategray
#38363adarkslategray
Accent foreground
#d1cfd3lightgrey
#d1cfd3lightgrey
Destructive
#aa420esaddlebrown
#ee6f2ftomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3a3836darkslategray
#3a3836darkslategray

Contrast

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

Light mode
Text on background19.61:1AAA
Text on card19.46:1AAA
Primary button7.67:1AAA
Secondary button7.61:1AAA
Muted text3.84:1AA Large
Accent7.74:1AAA
Destructive6.02:1AA
Dark mode
Text on background19.87:1AAA
Text on card20.04:1AAA
Primary button7.67:1AAA
Secondary button7.61:1AAA
Muted text5.43:1AA
Accent7.74:1AAA
Destructive6.95:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 60.252);
  --foreground: oklch(0.135 0.02 70.296);
  --muted: oklch(0.891 0.014 161.421);
  --muted-foreground: oklch(0.526 0.03 160.338);
  --popover: oklch(0.993 0.002 60.252);
  --popover-foreground: oklch(0.135 0.02 70.296);
  --card: oklch(0.985 0.005 60.22);
  --card-foreground: oklch(0.118 0.017 71.44);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.342 0.005 60.087);
  --primary-foreground: oklch(0.861 0.003 60.233);
  --secondary: oklch(0.345 0.007 161.274);
  --secondary-foreground: oklch(0.863 0.005 161.671);
  --accent: oklch(0.336 0.008 305.415);
  --accent-foreground: oklch(0.858 0.005 305.657);
  --destructive: oklch(0.514 0.148 41.912);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.342 0.005 60.087);
  --chart-1: oklch(0.342 0.005 60.087);
  --chart-2: oklch(0.345 0.007 161.274);
  --chart-3: oklch(0.336 0.008 305.415);
  --chart-4: oklch(0.374 0.008 161.261);
  --chart-5: oklch(0.342 0.009 59.938);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.117 0.013 68.787);
  --foreground: oklch(0.993 0.001 60.267);
  --muted: oklch(0.279 0.019 160.094);
  --muted-foreground: oklch(0.697 0.028 160.788);
  --popover: oklch(0.117 0.013 68.787);
  --popover-foreground: oklch(0.993 0.001 60.267);
  --card: oklch(0.134 0.015 68.215);
  --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.342 0.005 60.087);
  --primary-foreground: oklch(0.861 0.003 60.233);
  --secondary: oklch(0.345 0.007 161.274);
  --secondary-foreground: oklch(0.863 0.005 161.671);
  --accent: oklch(0.336 0.008 305.415);
  --accent-foreground: oklch(0.858 0.005 305.657);
  --destructive: oklch(0.685 0.174 44.122);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.342 0.005 60.087);
  --chart-1: oklch(0.342 0.005 60.087);
  --chart-2: oklch(0.345 0.007 161.274);
  --chart-3: oklch(0.336 0.008 305.415);
  --chart-4: oklch(0.374 0.008 161.261);
  --chart-5: oklch(0.342 0.009 59.938);
}