Mansion for shadcn/ui

Mansion is a shadcn/ui theme built around a near-white primary color (#f8f7f7) with near-white accents (#f7f8f8). The light mode uses a neutral background (#fdf7f8). Dark mode keeps the near-white primary (#f8f7f7) on a neutral background (#080203).

Color palette

TokenLightDark
Background
#fdf7f8snow
#080203black
Foreground
#090102black
#fdfcfcsnow
Card
#fdf7f8snow
#080203black
Card foreground
#090102black
#fdfcfcsnow
Popover
#fdf7f8snow
#080203black
Popover foreground
#090102black
#fdfcfcsnow
Primary
#f8f7f7whitesmoke
#f8f7f7whitesmoke
Primary foreground
#615c5cdimgray
#615c5cdimgray
Secondary
#f7f8f8whitesmoke
#f7f8f8whitesmoke
Secondary foreground
#2a2d2cdarkslategray
#2a2d2cdarkslategray
Muted
#d8e9e6gainsboro
#162725black
Muted foreground
#43514fdarkslategray
#aebcbasilver
Accent
#f7f8f8whitesmoke
#f7f8f8whitesmoke
Accent foreground
#2a2d2cdarkslategray
#2a2d2cdarkslategray
Destructive
#7e0802maroon
#e20f03red
Destructive foreground
#feb7b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f8f7f7whitesmoke
#f8f7f7whitesmoke

Contrast

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

Light mode
Text on background19.51:1AAA
Text on card19.51:1AAA
Primary button6.14:1AA
Secondary button13.03:1AAA
Muted text6.60:1AA
Accent13.03:1AAA
Destructive6.59:1AA
Dark mode
Text on background20.08:1AAA
Text on card20.08:1AAA
Primary button6.14:1AA
Secondary button13.03:1AAA
Muted text7.92:1AAA
Accent13.03:1AAA
Destructive4.88:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 7.895);
  --foreground: oklch(0.101 0.024 9.152);
  --muted: oklch(0.92 0.018 187.269);
  --muted-foreground: oklch(0.423 0.019 186.617);
  --popover: oklch(0.981 0.006 7.895);
  --popover-foreground: oklch(0.101 0.024 9.152);
  --card: oklch(0.981 0.006 7.895);
  --card-foreground: oklch(0.101 0.024 9.152);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.977 0 7.761);
  --primary-foreground: oklch(0.479 0.007 8.125);
  --secondary: oklch(0.978 0 187.736);
  --secondary-foreground: oklch(0.293 0.004 187.433);
  --accent: oklch(0.978 0 187.736);
  --accent-foreground: oklch(0.293 0.004 187.433);
  --destructive: oklch(0.376 0.149 29.923);
  --destructive-foreground: oklch(0.845 0.083 22.353);
  --ring: oklch(0.977 0 7.761);
  --chart-1: oklch(0.977 0 7.761);
  --chart-2: oklch(0.978 0 187.736);
  --chart-3: oklch(0.978 0 187.736);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.977 0.001 7.774);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.104 0.019 8.775);
  --foreground: oklch(0.991 0.002 7.79);
  --muted: oklch(0.257 0.023 185.381);
  --muted-foreground: oklch(0.785 0.017 187.225);
  --popover: oklch(0.104 0.019 8.775);
  --popover-foreground: oklch(0.991 0.002 7.79);
  --card: oklch(0.104 0.019 8.775);
  --card-foreground: oklch(0.991 0.002 7.79);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.977 0 7.761);
  --primary-foreground: oklch(0.479 0.007 8.125);
  --secondary: oklch(0.978 0 187.736);
  --secondary-foreground: oklch(0.293 0.004 187.433);
  --accent: oklch(0.978 0 187.736);
  --accent-foreground: oklch(0.293 0.004 187.433);
  --destructive: oklch(0.577 0.232 29.593);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.977 0 7.761);
  --chart-1: oklch(0.977 0 7.761);
  --chart-2: oklch(0.978 0 187.736);
  --chart-3: oklch(0.978 0 187.736);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.977 0.001 7.774);
}