Political for shadcn/ui

Political is a shadcn/ui theme built around a muted green primary color (#637468) with neutral gray accents (#b0bab3). The light mode uses a neutral background (#f7fcf9). Dark mode keeps the muted green primary (#637468) on a neutral background (#040704).

Color palette

TokenLightDark
Background
#f7fcf9mintcream
#040704black
Foreground
#000000black
#f6f9f7whitesmoke
Card
#f7fcf9mintcream
#040704black
Card foreground
#000000black
#f6f9f7whitesmoke
Popover
#f7fcf9mintcream
#040704black
Popover foreground
#000000black
#f6f9f7whitesmoke
Primary
#637468dimgray
#637468dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cecfcelightgrey
#2c3a30darkslategray
Secondary foreground
#353635darkslategray
#c5d3c9lightgrey
Muted
#e0ebe3gainsboro
#141f17black
Muted foreground
#59645cdimgray
#9ba69edarkgray
Accent
#b0bab3darkgray
#34513cdarkslategray
Accent foreground
#1a1e1bblack
#d3e3d8gainsboro
Destructive
#7f1c0amaroon
#ee482btomato
Destructive foreground
#facac2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#637468dimgray
#637468dimgray

Contrast

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

Light mode
Text on background20.30:1AAA
Text on card20.30:1AAA
Primary button4.99:1AA
Secondary button7.77:1AAA
Muted text5.03:1AA
Accent8.45:1AAA
Destructive6.87:1AA
Dark mode
Text on background19.13:1AAA
Text on card19.13:1AAA
Primary button4.99:1AA
Secondary button7.73:1AAA
Muted text6.75:1AA
Accent6.60:1AA
Destructive3.75:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.007 155.736);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.929 0.014 155.57);
  --muted-foreground: oklch(0.491 0.019 155.123);
  --popover: oklch(0.987 0.007 155.736);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.007 155.736);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.54 0.028 154.858);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.854 0.001 155.837);
  --secondary-foreground: oklch(0.332 0.002 155.756);
  --accent: oklch(0.779 0.015 155.491);
  --accent-foreground: oklch(0.23 0.008 155.203);
  --destructive: oklch(0.394 0.137 32.24);
  --destructive-foreground: oklch(0.879 0.056 29.83);
  --ring: oklch(0.54 0.028 154.858);
  --chart-1: oklch(0.54 0.028 154.858);
  --chart-2: oklch(0.854 0.001 155.837);
  --chart-3: oklch(0.779 0.015 155.491);
  --chart-4: oklch(0.877 0.001 155.843);
  --chart-5: oklch(0.545 0.038 154.478);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.011 155.602);
  --foreground: oklch(0.979 0.004 155.789);
  --muted: oklch(0.225 0.02 154.023);
  --muted-foreground: oklch(0.715 0.017 155.407);
  --popover: oklch(0.12 0.011 155.602);
  --popover-foreground: oklch(0.979 0.004 155.789);
  --card: oklch(0.12 0.011 155.602);
  --card-foreground: oklch(0.979 0.004 155.789);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.54 0.028 154.858);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.332 0.024 154.411);
  --secondary-foreground: oklch(0.853 0.019 155.435);
  --accent: oklch(0.405 0.049 153.272);
  --accent-foreground: oklch(0.901 0.022 155.389);
  --destructive: oklch(0.636 0.207 32.38);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.54 0.028 154.858);
  --chart-1: oklch(0.54 0.028 154.858);
  --chart-2: oklch(0.332 0.024 154.411);
  --chart-3: oklch(0.405 0.049 153.272);
  --chart-4: oklch(0.363 0.027 154.368);
  --chart-5: oklch(0.545 0.038 154.478);
}