Marxism for shadcn/ui

Marxism is a shadcn/ui theme built around a blue primary color (#475ddc) with yellow accents (#dcc647). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the blue primary (#475ddc) on a neutral background (#020308).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#020308black
Foreground
#03040cblack
#f9f9fbghostwhite
Card
#fcfcfdwhite
#020308black
Card foreground
#03040cblack
#f9f9fbghostwhite
Popover
#fcfcfdwhite
#020308black
Popover foreground
#03040cblack
#f9f9fbghostwhite
Primary
#475ddcroyalblue
#475ddcroyalblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dcc647sandybrown
#dcc647sandybrown
Secondary foreground
#49400edarkolivegreen
#49400edarkolivegreen
Muted
#eeede8linen
#171711black
Muted foreground
#4c4a3edarkslategray
#c1bfb3silver
Accent
#dcc647sandybrown
#dcc647sandybrown
Accent foreground
#49400edarkolivegreen
#49400edarkolivegreen
Destructive
#8d1e07darkred
#f44b2atomato
Destructive foreground
#fcd2capink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#475ddcroyalblue
#475ddcroyalblue

Contrast

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

Light mode
Text on background19.91:1AAA
Text on card19.91:1AAA
Primary button5.42:1AA
Secondary button6.01:1AA
Muted text7.58:1AAA
Accent6.01:1AA
Destructive6.58:1AA
Dark mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button5.42:1AA
Secondary button6.01:1AA
Muted text9.76:1AAA
Accent6.01:1AA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 278.287);
  --foreground: oklch(0.113 0.022 271.052);
  --muted: oklch(0.945 0.007 98.422);
  --muted-foreground: oklch(0.406 0.019 98.924);
  --popover: oklch(0.991 0.002 278.287);
  --popover-foreground: oklch(0.113 0.022 271.052);
  --card: oklch(0.991 0.002 278.287);
  --card-foreground: oklch(0.113 0.022 271.052);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.536 0.194 270.775);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.821 0.145 99.114);
  --secondary-foreground: oklch(0.37 0.068 98.905);
  --accent: oklch(0.821 0.145 99.114);
  --accent-foreground: oklch(0.37 0.068 98.905);
  --destructive: oklch(0.42 0.149 32.671);
  --destructive-foreground: oklch(0.898 0.049 31.249);
  --ring: oklch(0.536 0.194 270.775);
  --chart-1: oklch(0.536 0.194 270.775);
  --chart-2: oklch(0.821 0.145 99.114);
  --chart-3: oklch(0.821 0.145 99.114);
  --chart-4: oklch(0.833 0.138 99.303);
  --chart-5: oklch(0.533 0.202 270.336);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.018 271.303);
  --foreground: oklch(0.984 0.001 278.297);
  --muted: oklch(0.202 0.01 98.958);
  --muted-foreground: oklch(0.803 0.016 98.596);
  --popover: oklch(0.099 0.018 271.303);
  --popover-foreground: oklch(0.984 0.001 278.297);
  --card: oklch(0.099 0.018 271.303);
  --card-foreground: oklch(0.984 0.001 278.297);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.536 0.194 270.775);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.821 0.145 99.114);
  --secondary-foreground: oklch(0.37 0.068 98.905);
  --accent: oklch(0.821 0.145 99.114);
  --accent-foreground: oklch(0.37 0.068 98.905);
  --destructive: oklch(0.649 0.21 33.132);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.536 0.194 270.775);
  --chart-1: oklch(0.536 0.194 270.775);
  --chart-2: oklch(0.821 0.145 99.114);
  --chart-3: oklch(0.821 0.145 99.114);
  --chart-4: oklch(0.833 0.138 99.303);
  --chart-5: oklch(0.533 0.202 270.336);
}