Compromise for shadcn/ui

Compromise is a shadcn/ui theme built around a deep pink primary color (#681d47) with muted pink accents (#c6b3be). The light mode uses a neutral background (#fcf8fa). Dark mode keeps the deep pink primary (#681d47) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#fcf8fasnow
#040103black
Foreground
#040103black
#faf5f8whitesmoke
Card
#faf4f8whitesmoke
#070305black
Card foreground
#000000black
#fbf8fasnow
Popover
#faf4f8whitesmoke
#070305black
Popover foreground
#000000black
#fbf8fasnow
Primary
#681d47purple
#681d47purple
Primary foreground
#f0c7depink
#f0c7depink
Secondary
#d5cdd2lightgrey
#191517black
Secondary foreground
#3d3339darkslategray
#b7a9b1darkgray
Muted
#e1dbdegainsboro
#241e22black
Muted foreground
#685e64dimgray
#a1979cdarkgray
Accent
#c6b3besilver
#34232cdarkslategray
Accent foreground
#291f24black
#cfb9c6silver
Destructive
#aa230efirebrick
#ef553etomato
Destructive foreground
#fdeeeclinen
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#681d47purple
#681d47purple

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.40:1AAA
Primary button7.51:1AAA
Secondary button7.79:1AAA
Muted text4.56:1AA
Accent8.07:1AAA
Destructive6.31:1AA
Dark mode
Text on background19.25:1AAA
Text on card19.44:1AAA
Primary button7.51:1AAA
Secondary button8.03:1AAA
Muted text5.76:1AA
Accent8.01:1AAA
Destructive6.05:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 341.94);
  --foreground: oklch(0.084 0.019 341.834);
  --muted: oklch(0.897 0.007 341.995);
  --muted-foreground: oklch(0.495 0.015 342.535);
  --popover: oklch(0.974 0.008 342.007);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.974 0.008 342.007);
  --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.365 0.117 349.565);
  --primary-foreground: oklch(0.871 0.055 343.252);
  --secondary: oklch(0.856 0.011 342.116);
  --secondary-foreground: oklch(0.334 0.017 343.001);
  --accent: oklch(0.787 0.026 342.568);
  --accent-foreground: oklch(0.252 0.018 343.47);
  --destructive: oklch(0.48 0.174 31.543);
  --destructive-foreground: oklch(0.962 0.017 28.027);
  --ring: oklch(0.365 0.117 349.565);
  --chart-1: oklch(0.365 0.117 349.565);
  --chart-2: oklch(0.856 0.011 342.116);
  --chart-3: oklch(0.787 0.026 342.568);
  --chart-4: oklch(0.881 0.009 342.056);
  --chart-5: oklch(0.366 0.122 349.988);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.013 341.827);
  --foreground: oklch(0.974 0.006 341.959);
  --muted: oklch(0.244 0.01 342.74);
  --muted-foreground: oklch(0.685 0.014 342.295);
  --popover: oklch(0.108 0.017 341.827);
  --popover-foreground: oklch(0.983 0.004 341.907);
  --card: oklch(0.108 0.017 341.827);
  --card-foreground: oklch(0.983 0.004 341.907);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.365 0.117 349.565);
  --primary-foreground: oklch(0.871 0.055 343.252);
  --secondary: oklch(0.201 0.008 342.735);
  --secondary-foreground: oklch(0.749 0.02 342.43);
  --accent: oklch(0.28 0.03 344.176);
  --accent-foreground: oklch(0.809 0.03 342.687);
  --destructive: oklch(0.655 0.194 31.391);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.365 0.117 349.565);
  --chart-1: oklch(0.365 0.117 349.565);
  --chart-2: oklch(0.201 0.008 342.735);
  --chart-3: oklch(0.28 0.03 344.176);
  --chart-4: oklch(0.233 0.01 342.831);
  --chart-5: oklch(0.366 0.122 349.988);
}