Communist for shadcn/ui

Communist is a shadcn/ui theme built around a light orange primary color (#fcf6f3) with muted light orange accents (#cfbeb4). The light mode uses a neutral background (#ffffff). Dark mode keeps the light orange primary (#fcf6f3) on a neutral background (#040201).

Color palette

TokenLightDark
Background
#ffffffwhite
#040201black
Foreground
#0c0603black
#ffffffwhite
Card
#ffffffwhite
#040201black
Card foreground
#0c0603black
#ffffffwhite
Popover
#ffffffwhite
#040201black
Popover foreground
#0c0603black
#ffffffwhite
Primary
#fcf6f3floralwhite
#fcf6f3floralwhite
Primary foreground
#442412maroon
#442412maroon
Secondary
#dcd4d0lightgrey
#24201eblack
Secondary foreground
#463a34darkslategray
#c1b8b3silver
Muted
#e3dcd9gainsboro
#26201cblack
Muted foreground
#5d5551dimgray
#aea6a2darkgray
Accent
#cfbeb4silver
#382e29darkslategray
Accent foreground
#322620darkslategray
#d2c7c1silver
Destructive
#9e2f00saddlebrown
#e64500orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fcf6f3floralwhite
#fcf6f3floralwhite

Contrast

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

Light mode
Text on background20.13:1AAA
Text on card20.13:1AAA
Primary button13.01:1AAA
Secondary button7.52:1AAA
Muted text5.38:1AA
Accent8.13:1AAA
Destructive7.31:1AAA
Dark mode
Text on background20.68:1AAA
Text on card20.68:1AAA
Primary button13.01:1AAA
Secondary button8.26:1AAA
Muted text6.73:1AA
Accent7.95:1AAA
Destructive4.04:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.132 0.015 58.651);
  --muted: oklch(0.9 0.009 50.537);
  --muted-foreground: oklch(0.455 0.012 50.32);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.132 0.015 58.651);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.132 0.015 58.651);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.977 0.007 50.561);
  --primary-foreground: oklch(0.299 0.057 47.793);
  --secondary: oklch(0.876 0.011 50.504);
  --secondary-foreground: oklch(0.361 0.02 49.996);
  --accent: oklch(0.813 0.024 50.295);
  --accent-foreground: oklch(0.281 0.021 49.78);
  --destructive: oklch(0.471 0.154 38.099);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.977 0.007 50.561);
  --chart-1: oklch(0.977 0.007 50.561);
  --chart-2: oklch(0.876 0.011 50.504);
  --chart-3: oklch(0.813 0.024 50.295);
  --chart-4: oklch(0.9 0.009 50.537);
  --chart-5: oklch(0.977 0.008 50.555);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.091 0.008 56.795);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.248 0.012 50.082);
  --muted-foreground: oklch(0.732 0.011 50.468);
  --popover: oklch(0.091 0.008 56.795);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.091 0.008 56.795);
  --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.977 0.007 50.561);
  --primary-foreground: oklch(0.299 0.057 47.793);
  --secondary: oklch(0.248 0.008 50.266);
  --secondary-foreground: oklch(0.789 0.012 50.462);
  --accent: oklch(0.311 0.018 49.985);
  --accent-foreground: oklch(0.837 0.015 50.432);
  --destructive: oklch(0.617 0.206 37.099);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.977 0.007 50.561);
  --chart-1: oklch(0.977 0.007 50.561);
  --chart-2: oklch(0.248 0.008 50.266);
  --chart-3: oklch(0.311 0.018 49.985);
  --chart-4: oklch(0.28 0.009 50.244);
  --chart-5: oklch(0.977 0.008 50.555);
}