Political for shadcn/ui

Political is a shadcn/ui theme built around a near-black primary color (#0d0203) with near-black accents (#0d0602). The light mode uses a neutral background (#fcf8f8). Dark mode keeps the near-black primary (#0d0203) on a neutral background (#070303).

Color palette

TokenLightDark
Background
#fcf8f8snow
#070303black
Foreground
#130608black
#faf4f5whitesmoke
Card
#fbf4f5lavenderblush
#0b0405black
Card foreground
#100506black
#fcf8f8snow
Popover
#fcf8f8snow
#070303black
Popover foreground
#130608black
#faf4f5whitesmoke
Primary
#0d0203black
#0d0203black
Primary foreground
#f4b3bblightpink
#f4b3bblightpink
Secondary
#0d0209black
#0d0209black
Secondary foreground
#e75ab1hotpink
#e75ab1hotpink
Muted
#e8cfdegainsboro
#301727black
Muted foreground
#4d4249darkslategray
#bdb2b9silver
Accent
#0d0602black
#0d0602black
Accent foreground
#e7905asandybrown
#e7905asandybrown
Destructive
#920907darkred
#f41915red
Destructive foreground
#fdcfcepink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0d0203black
#0d0203black

Contrast

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

Light mode
Text on background18.80:1AAA
Text on card18.48:1AAA
Primary button11.69:1AAA
Secondary button6.30:1AA
Muted text6.56:1AA
Accent8.15:1AAA
Destructive6.61:1AA
Dark mode
Text on background18.87:1AAA
Text on card19.24:1AAA
Primary button11.69:1AAA
Secondary button6.30:1AA
Muted text7.99:1AAA
Accent8.15:1AAA
Destructive4.20: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.982 0.005 9.029);
  --foreground: oklch(0.146 0.025 11.802);
  --muted: oklch(0.879 0.034 340.313);
  --muted-foreground: oklch(0.392 0.019 340.521);
  --popover: oklch(0.982 0.005 9.029);
  --popover-foreground: oklch(0.146 0.025 11.802);
  --card: oklch(0.972 0.007 9.091);
  --card-foreground: oklch(0.134 0.022 10.816);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.115 0.03 11.157);
  --primary-foreground: oklch(0.829 0.076 11.1);
  --secondary: oklch(0.119 0.035 340.465);
  --secondary-foreground: oklch(0.676 0.197 345.669);
  --accent: oklch(0.133 0.02 65.169);
  --accent-foreground: oklch(0.733 0.127 51.49);
  --destructive: oklch(0.419 0.166 28.909);
  --destructive-foreground: oklch(0.894 0.052 19.305);
  --ring: oklch(0.115 0.03 11.157);
  --chart-1: oklch(0.115 0.03 11.157);
  --chart-2: oklch(0.119 0.035 340.465);
  --chart-3: oklch(0.133 0.02 65.169);
  --chart-4: oklch(0.159 0.049 344.608);
  --chart-5: oklch(0.114 0.031 11.334);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.013 9.745);
  --foreground: oklch(0.973 0.006 9.063);
  --muted: oklch(0.247 0.047 343.352);
  --muted-foreground: oklch(0.775 0.016 339.925);
  --popover: oklch(0.107 0.013 9.745);
  --popover-foreground: oklch(0.973 0.006 9.063);
  --card: oklch(0.123 0.015 9.779);
  --card-foreground: oklch(0.982 0.004 9.011);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.115 0.03 11.157);
  --primary-foreground: oklch(0.829 0.076 11.1);
  --secondary: oklch(0.119 0.035 340.465);
  --secondary-foreground: oklch(0.676 0.197 345.669);
  --accent: oklch(0.133 0.02 65.169);
  --accent-foreground: oklch(0.733 0.127 51.49);
  --destructive: oklch(0.614 0.243 28.807);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.115 0.03 11.157);
  --chart-1: oklch(0.115 0.03 11.157);
  --chart-2: oklch(0.119 0.035 340.465);
  --chart-3: oklch(0.133 0.02 65.169);
  --chart-4: oklch(0.159 0.049 344.608);
  --chart-5: oklch(0.114 0.031 11.334);
}