Contribution for shadcn/ui

Contribution is a shadcn/ui theme built around a deep indigo primary color (#130e34) with deep green accents (#0e3413). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the deep indigo primary (#130e34) on an indigo-tinted background (#07060e).

Color palette

TokenLightDark
Background
#fcfbfewhite
#07060eblack
Foreground
#030208black
#fcfcfdwhite
Card
#fcfbfewhite
#07060eblack
Card foreground
#030208black
#fcfcfdwhite
Popover
#fcfbfewhite
#07060eblack
Popover foreground
#030208black
#fcfcfdwhite
Primary
#130e34black
#130e34black
Primary foreground
#9d92e2mediumpurple
#9d92e2mediumpurple
Secondary
#34130eblack
#34130eblack
Secondary foreground
#e29d92darksalmon
#e29d92darksalmon
Muted
#e7e0dfgainsboro
#201918black
Muted foreground
#63524fdimgray
#b09f9cdarkgray
Accent
#0e3413darkgreen
#0e3413darkgreen
Accent foreground
#42cd54limegreen
#42cd54limegreen
Destructive
#a83000firebrick
#ff530forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#130e34black
#130e34black

Contrast

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

Light mode
Text on background20.06:1AAA
Text on card20.06:1AAA
Primary button6.70:1AA
Secondary button7.59:1AAA
Muted text5.65:1AA
Accent6.61:1AA
Destructive6.79:1AA
Dark mode
Text on background19.66:1AAA
Text on card19.66:1AAA
Primary button6.70:1AA
Secondary button7.59:1AAA
Muted text6.81:1AA
Accent6.61:1AA
Destructive3.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 292.487);
  --foreground: oklch(0.097 0.021 290.462);
  --muted: oklch(0.912 0.008 27.975);
  --muted-foreground: oklch(0.455 0.023 28.278);
  --popover: oklch(0.99 0.003 292.487);
  --popover-foreground: oklch(0.097 0.021 290.462);
  --card: oklch(0.99 0.003 292.487);
  --card-foreground: oklch(0.097 0.021 290.462);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.198 0.072 283.661);
  --primary-foreground: oklch(0.701 0.116 289.173);
  --secondary: oklch(0.238 0.055 30.558);
  --secondary-foreground: oklch(0.76 0.085 28.909);
  --accent: oklch(0.29 0.072 145.765);
  --accent-foreground: oklch(0.748 0.201 145.313);
  --destructive: oklch(0.489 0.164 36.993);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.198 0.072 283.661);
  --chart-1: oklch(0.198 0.072 283.661);
  --chart-2: oklch(0.238 0.055 30.558);
  --chart-3: oklch(0.29 0.072 145.765);
  --chart-4: oklch(0.268 0.066 30.738);
  --chart-5: oklch(0.196 0.076 282.975);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.02 290.595);
  --foreground: oklch(0.991 0.002 292.506);
  --muted: oklch(0.222 0.011 28.27);
  --muted-foreground: oklch(0.715 0.02 28.102);
  --popover: oklch(0.129 0.02 290.595);
  --popover-foreground: oklch(0.991 0.002 292.506);
  --card: oklch(0.129 0.02 290.595);
  --card-foreground: oklch(0.991 0.002 292.506);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.198 0.072 283.661);
  --primary-foreground: oklch(0.701 0.116 289.173);
  --secondary: oklch(0.238 0.055 30.558);
  --secondary-foreground: oklch(0.76 0.085 28.909);
  --accent: oklch(0.29 0.072 145.765);
  --accent-foreground: oklch(0.748 0.201 145.313);
  --destructive: oklch(0.674 0.218 37.516);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.198 0.072 283.661);
  --chart-1: oklch(0.198 0.072 283.661);
  --chart-2: oklch(0.238 0.055 30.558);
  --chart-3: oklch(0.29 0.072 145.765);
  --chart-4: oklch(0.268 0.066 30.738);
  --chart-5: oklch(0.196 0.076 282.975);
}