Solidarity for shadcn/ui

Solidarity is a shadcn/ui theme built around a deep green primary color (#141d07) with deep pink accents (#1d0714). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the deep green primary (#141d07) on a neutral background (#060802).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#060802black
Foreground
#060901black
#fdfdfcwhite
Card
#fafcf8snow
#090c04black
Card foreground
#030401black
#ffffffwhite
Popover
#fafcf8snow
#090c04black
Popover foreground
#030401black
#ffffffwhite
Primary
#141d07black
#141d07black
Primary foreground
#89c12fyellowgreen
#89c12fyellowgreen
Secondary
#07141dblack
#07141dblack
Secondary foreground
#78b7deskyblue
#78b7deskyblue
Muted
#eef0f1whitesmoke
#0e1011black
Muted foreground
#3f4040darkslategray
#bfbfc0silver
Accent
#1d0714black
#1d0714black
Accent foreground
#de78b7orchid
#de78b7orchid
Destructive
#a6170cfirebrick
#ee2517orangered
Destructive foreground
#fde9e7linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#141d07black
#141d07black

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.87:1AAA
Primary button8.06:1AAA
Secondary button8.52:1AAA
Muted text9.10:1AAA
Accent6.84:1AA
Destructive6.54:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.75:1AAA
Primary button8.06:1AAA
Secondary button8.52:1AAA
Muted text10.40:1AAA
Accent6.84:1AA
Destructive4.29:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 123.674);
  --foreground: oklch(0.131 0.025 122.859);
  --muted: oklch(0.954 0.003 234.548);
  --muted-foreground: oklch(0.371 0.001 234.558);
  --popover: oklch(0.988 0.005 123.709);
  --popover-foreground: oklch(0.104 0.02 122.859);
  --card: oklch(0.988 0.005 123.709);
  --card-foreground: oklch(0.104 0.02 122.859);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.215 0.04 126.797);
  --primary-foreground: oklch(0.745 0.179 128.828);
  --secondary: oklch(0.185 0.026 237.045);
  --secondary-foreground: oklch(0.751 0.086 236.827);
  --accent: oklch(0.172 0.044 344.518);
  --accent-foreground: oklch(0.705 0.147 343.75);
  --destructive: oklch(0.465 0.178 29.679);
  --destructive-foreground: oklch(0.949 0.022 22.492);
  --ring: oklch(0.215 0.04 126.797);
  --chart-1: oklch(0.215 0.04 126.797);
  --chart-2: oklch(0.185 0.026 237.045);
  --chart-3: oklch(0.172 0.044 344.518);
  --chart-4: oklch(0.222 0.034 238.274);
  --chart-5: oklch(0.217 0.042 126.9);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.017 123.075);
  --foreground: oklch(0.993 0.001 123.661);
  --muted: oklch(0.17 0.004 234.884);
  --muted-foreground: oklch(0.805 0.001 234.526);
  --popover: oklch(0.145 0.02 123.268);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.145 0.02 123.268);
  --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.215 0.04 126.797);
  --primary-foreground: oklch(0.745 0.179 128.828);
  --secondary: oklch(0.185 0.026 237.045);
  --secondary-foreground: oklch(0.751 0.086 236.827);
  --accent: oklch(0.172 0.044 344.518);
  --accent-foreground: oklch(0.705 0.147 343.75);
  --destructive: oklch(0.607 0.232 29.685);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.215 0.04 126.797);
  --chart-1: oklch(0.215 0.04 126.797);
  --chart-2: oklch(0.185 0.026 237.045);
  --chart-3: oklch(0.172 0.044 344.518);
  --chart-4: oklch(0.222 0.034 238.274);
  --chart-5: oklch(0.217 0.042 126.9);
}