Political for shadcn/ui

Political is a shadcn/ui theme built around a light indigo primary color (#f4f3fc) with muted light indigo accents (#bcbac9). The light mode uses a neutral background (#ffffff). Dark mode keeps the light indigo primary (#f4f3fc) on an indigo-tinted background (#05040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#05040bblack
Foreground
#050411black
#f8f8fcghostwhite
Card
#fcfcfcsnow
#07060fblack
Card foreground
#04030cblack
#fcfbfdsnow
Popover
#fcfcfcsnow
#07060fblack
Popover foreground
#04030cblack
#fcfbfdsnow
Primary
#f4f3fcghostwhite
#f4f3fcghostwhite
Primary foreground
#322796darkslateblue
#322796darkslateblue
Secondary
#d4d4d9lightgrey
#2d2d2fdarkslategray
Secondary foreground
#3a3a41darkslategray
#c6c5c9silver
Muted
#dcdce0gainsboro
#201f23black
Muted foreground
#5a5a5edimgray
#a2a1a5darkgray
Accent
#bcbac9silver
#393843darkslategray
Accent foreground
#25242edarkslategray
#d3d3dalightgrey
Destructive
#6a0b06maroon
#d9170dfirebrick
Destructive foreground
#faaca8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f4f3fcghostwhite
#f4f3fcghostwhite

Contrast

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

Light mode
Text on background20.35:1AAA
Text on card20.07:1AAA
Primary button10.20:1AAA
Secondary button7.62:1AAA
Muted text5.01:1AA
Accent8.05:1AAA
Destructive6.92:1AA
Dark mode
Text on background19.24:1AAA
Text on card19.56:1AAA
Primary button10.20:1AAA
Secondary button8.04:1AAA
Muted text6.37:1AA
Accent7.77:1AAA
Destructive5.15:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.118 0.032 286.867);
  --muted: oklch(0.896 0.005 290.9);
  --muted-foreground: oklch(0.469 0.006 290.778);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.107 0.028 287.577);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.107 0.028 287.577);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.967 0.012 290.779);
  --primary-foreground: oklch(0.368 0.172 278.194);
  --secondary: oklch(0.871 0.007 290.869);
  --secondary-foreground: oklch(0.35 0.013 290.323);
  --accent: oklch(0.796 0.021 290.522);
  --accent-foreground: oklch(0.265 0.018 289.685);
  --destructive: oklch(0.337 0.128 29.33);
  --destructive-foreground: oklch(0.819 0.092 22.615);
  --ring: oklch(0.967 0.012 290.779);
  --chart-1: oklch(0.967 0.012 290.779);
  --chart-2: oklch(0.871 0.007 290.869);
  --chart-3: oklch(0.796 0.021 290.522);
  --chart-4: oklch(0.896 0.005 290.9);
  --chart-5: oklch(0.966 0.013 290.766);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.018 289.16);
  --foreground: oklch(0.98 0.005 290.915);
  --muted: oklch(0.242 0.008 290.422);
  --muted-foreground: oklch(0.712 0.005 290.874);
  --popover: oklch(0.128 0.021 288.693);
  --popover-foreground: oklch(0.99 0.003 290.965);
  --card: oklch(0.128 0.021 288.693);
  --card-foreground: oklch(0.99 0.003 290.965);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.967 0.012 290.779);
  --primary-foreground: oklch(0.368 0.172 278.194);
  --secondary: oklch(0.297 0.005 290.699);
  --secondary-foreground: oklch(0.825 0.005 290.907);
  --accent: oklch(0.345 0.019 289.946);
  --accent-foreground: oklch(0.868 0.01 290.795);
  --destructive: oklch(0.562 0.222 29.458);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.967 0.012 290.779);
  --chart-1: oklch(0.967 0.012 290.779);
  --chart-2: oklch(0.297 0.005 290.699);
  --chart-3: oklch(0.345 0.019 289.946);
  --chart-4: oklch(0.326 0.006 290.688);
  --chart-5: oklch(0.966 0.013 290.766);
}