Stranger for shadcn/ui

Stranger is a shadcn/ui theme built around a muted light red primary color (#cfc6c4) with muted light red accents (#d3c5c0). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light red primary (#cfc6c4) on a red-tinted background (#0b0605).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0605black
Foreground
#000000black
#fafaf9snow
Card
#fcfcfcsnow
#0e0806black
Card foreground
#000000black
#fdfcfcsnow
Popover
#fcfcfcsnow
#0e0806black
Popover foreground
#000000black
#fdfcfcsnow
Primary
#cfc6c4silver
#cfc6c4silver
Primary foreground
#362e2bdarkslategray
#362e2bdarkslategray
Secondary
#e4dfddgainsboro
#161312black
Secondary foreground
#4f4340darkslategray
#b6a9a5darkgray
Muted
#e5d6d2gainsboro
#2d1f1ablack
Muted foreground
#5f534fdimgray
#b0a4a0darkgray
Accent
#d3c5c0silver
#2c2320darkslategray
Accent foreground
#392c28darkslategray
#c9bab5silver
Destructive
#762104maroon
#f86230tomato
Destructive foreground
#fcc3b0lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cfc6c4silver
#cfc6c4silver

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.93:1AAA
Secondary button7.17:1AAA
Muted text5.25:1AA
Accent7.96:1AAA
Destructive6.82:1AA
Dark mode
Text on background19.29:1AAA
Text on card19.40:1AAA
Primary button7.93:1AAA
Secondary button8.08:1AAA
Muted text6.56:1AA
Accent8.15:1AAA
Destructive6.76:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.887 0.017 37.661);
  --muted-foreground: oklch(0.451 0.017 37.614);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.834 0.011 37.683);
  --primary-foreground: oklch(0.308 0.013 37.608);
  --secondary: oklch(0.906 0.006 37.71);
  --secondary-foreground: oklch(0.395 0.018 37.604);
  --accent: oklch(0.832 0.017 37.657);
  --accent-foreground: oklch(0.306 0.02 37.592);
  --destructive: oklch(0.381 0.124 36.649);
  --destructive-foreground: oklch(0.864 0.071 39.231);
  --ring: oklch(0.834 0.011 37.683);
  --chart-1: oklch(0.834 0.011 37.683);
  --chart-2: oklch(0.906 0.006 37.71);
  --chart-3: oklch(0.832 0.017 37.657);
  --chart-4: oklch(0.93 0.004 37.718);
  --chart-5: oklch(0.833 0.014 37.669);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.011 42.561);
  --foreground: oklch(0.984 0.001 37.738);
  --muted: oklch(0.254 0.024 37.609);
  --muted-foreground: oklch(0.728 0.015 37.656);
  --popover: oklch(0.143 0.013 41.146);
  --popover-foreground: oklch(0.992 0 37.74);
  --card: oklch(0.143 0.013 41.146);
  --card-foreground: oklch(0.992 0 37.74);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.834 0.011 37.683);
  --primary-foreground: oklch(0.308 0.013 37.608);
  --secondary: oklch(0.192 0.005 37.633);
  --secondary-foreground: oklch(0.744 0.016 37.655);
  --accent: oklch(0.266 0.015 37.593);
  --accent-foreground: oklch(0.8 0.019 37.646);
  --destructive: oklch(0.681 0.194 37.941);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.834 0.011 37.683);
  --chart-1: oklch(0.834 0.011 37.683);
  --chart-2: oklch(0.192 0.005 37.633);
  --chart-3: oklch(0.266 0.015 37.593);
  --chart-4: oklch(0.225 0.007 37.625);
  --chart-5: oklch(0.833 0.014 37.669);
}