Eurocentrism for shadcn/ui

Eurocentrism is a shadcn/ui theme built around a muted purple primary color (#785d7e) with muted purple accents (#7e5d74). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted purple primary (#785d7e) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#fdfbfewhite
#060307black
Foreground
#030104black
#fbf8fcghostwhite
Card
#fcf7fdghostwhite
#0a040bblack
Card foreground
#000000black
#fdfbfdsnow
Popover
#fdfbfewhite
#060307black
Popover foreground
#030104black
#fbf8fcghostwhite
Primary
#785d7edimgray
#785d7edimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#675d7edimgray
#675d7edimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dedae7gainsboro
#1c1825black
Muted foreground
#5d5c61dimgray
#a09ea3darkgray
Accent
#7e5d74dimgray
#7e5d74dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#bc280bfirebrick
#f24826orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#785d7edimgray
#785d7edimgray

Contrast

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

Light mode
Text on background20.20:1AAA
Text on card19.81:1AAA
Primary button5.72:1AA
Secondary button6.08:1AA
Muted text4.81:1AA
Accent5.65:1AA
Destructive6.08:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.67:1AAA
Primary button5.72:1AA
Secondary button6.08:1AA
Muted text6.56:1AA
Accent5.65:1AA
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 319.446);
  --foreground: oklch(0.084 0.02 321.4);
  --muted: oklch(0.895 0.019 299.686);
  --muted-foreground: oklch(0.477 0.009 299.713);
  --popover: oklch(0.99 0.005 319.446);
  --popover-foreground: oklch(0.084 0.02 321.4);
  --card: oklch(0.981 0.01 319.447);
  --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.518 0.06 319.464);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.501 0.053 298.229);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.521 0.054 337.722);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.519 0.187 32.475);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.518 0.06 319.464);
  --chart-1: oklch(0.518 0.06 319.464);
  --chart-2: oklch(0.501 0.053 298.229);
  --chart-3: oklch(0.521 0.054 337.722);
  --chart-4: oklch(0.525 0.056 298.214);
  --chart-5: oklch(0.515 0.072 319.46);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.018 320.834);
  --foreground: oklch(0.982 0.006 319.446);
  --muted: oklch(0.22 0.027 297.953);
  --muted-foreground: oklch(0.702 0.008 299.838);
  --popover: oklch(0.109 0.018 320.834);
  --popover-foreground: oklch(0.982 0.006 319.446);
  --card: oklch(0.124 0.02 320.763);
  --card-foreground: oklch(0.991 0.003 319.445);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.518 0.06 319.464);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.501 0.053 298.229);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.521 0.054 337.722);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.643 0.212 33.082);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.518 0.06 319.464);
  --chart-1: oklch(0.518 0.06 319.464);
  --chart-2: oklch(0.501 0.053 298.229);
  --chart-3: oklch(0.521 0.054 337.722);
  --chart-4: oklch(0.525 0.056 298.214);
  --chart-5: oklch(0.515 0.072 319.46);
}