Communist for shadcn/ui

Communist is a shadcn/ui theme built around a vivid deep red primary color (#190501) with vivid deep cyan accents (#011419). The light mode uses a neutral background (#fefcfb). Dark mode keeps the vivid deep red primary (#190501) on a red-tinted background (#0f0705).

Color palette

TokenLightDark
Background
#fefcfbsnow
#0f0705black
Foreground
#000000black
#fdfcfbsnow
Card
#fdf8f7snow
#130907black
Card foreground
#000000black
#ffffffwhite
Popover
#fdf8f7snow
#130907black
Popover foreground
#000000black
#ffffffwhite
Primary
#190501black
#190501black
Primary foreground
#f97153coral
#f97153coral
Secondary
#011419black
#011419black
Secondary foreground
#08b6dddarkturquoise
#08b6dddarkturquoise
Muted
#d4e4e7gainsboro
#18272bdarkslategray
Muted foreground
#515b5ddimgray
#a2acaedarkgray
Accent
#011419black
#011419black
Accent foreground
#08b6dddarkturquoise
#08b6dddarkturquoise
Destructive
#631903maroon
#f96234tomato
Destructive foreground
#fcb29cburlywood
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#190501black
#190501black

Contrast

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

Light mode
Text on background20.46:1AAA
Text on card19.94:1AAA
Primary button7.06:1AAA
Secondary button7.83:1AAA
Muted text5.34:1AA
Accent7.83:1AAA
Destructive7.16:1AAA
Dark mode
Text on background19.45:1AAA
Text on card19.64:1AAA
Primary button7.06:1AAA
Secondary button7.83:1AAA
Muted text6.62:1AA
Accent7.83:1AAA
Destructive6.81:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 32.661);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.908 0.017 212.692);
  --muted-foreground: oklch(0.462 0.013 212.723);
  --popover: oklch(0.983 0.005 32.661);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.005 32.661);
  --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.151 0.04 42.798);
  --primary-foreground: oklch(0.707 0.173 34.072);
  --secondary: oklch(0.177 0.029 212.755);
  --secondary-foreground: oklch(0.72 0.131 220.697);
  --accent: oklch(0.177 0.029 212.755);
  --accent-foreground: oklch(0.72 0.131 220.697);
  --destructive: oklch(0.335 0.11 36.316);
  --destructive-foreground: oklch(0.829 0.092 37.632);
  --ring: oklch(0.151 0.04 42.798);
  --chart-1: oklch(0.151 0.04 42.798);
  --chart-2: oklch(0.177 0.029 212.755);
  --chart-3: oklch(0.177 0.029 212.755);
  --chart-4: oklch(0.226 0.038 215.503);
  --chart-5: oklch(0.151 0.041 43.495);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.016 36.704);
  --foreground: oklch(0.992 0.002 32.661);
  --muted: oklch(0.261 0.022 213.271);
  --muted-foreground: oklch(0.738 0.012 212.683);
  --popover: oklch(0.153 0.019 35.245);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.153 0.019 35.245);
  --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.151 0.04 42.798);
  --primary-foreground: oklch(0.707 0.173 34.072);
  --secondary: oklch(0.177 0.029 212.755);
  --secondary-foreground: oklch(0.72 0.131 220.697);
  --accent: oklch(0.177 0.029 212.755);
  --accent-foreground: oklch(0.72 0.131 220.697);
  --destructive: oklch(0.684 0.194 37.011);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.151 0.04 42.798);
  --chart-1: oklch(0.151 0.04 42.798);
  --chart-2: oklch(0.177 0.029 212.755);
  --chart-3: oklch(0.177 0.029 212.755);
  --chart-4: oklch(0.226 0.038 215.503);
  --chart-5: oklch(0.151 0.041 43.495);
}