Mansion for shadcn/ui

Mansion is a shadcn/ui theme built around a deep purple primary color (#251326) with deep green accents (#132613). The light mode uses a neutral background (#fefbfe). Dark mode keeps the deep purple primary (#251326) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfewhite
#000000black
Foreground
#0c030cblack
#fdfcfdwhite
Card
#fcf7fdghostwhite
#030303black
Card foreground
#080208black
#ffffffwhite
Popover
#fcf7fdghostwhite
#030303black
Popover foreground
#080208black
#ffffffwhite
Primary
#251326black
#251326black
Primary foreground
#cd9cceplum
#cd9cceplum
Secondary
#132613black
#132613black
Secondary foreground
#9ece9cdarkseagreen
#9ece9cdarkseagreen
Muted
#dadddagainsboro
#222522black
Muted foreground
#435143darkslategray
#aebcaedarkgray
Accent
#132613black
#132613black
Accent foreground
#9ece9cdarkseagreen
#9ece9cdarkseagreen
Destructive
#c82314firebrick
#ec4f41tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#251326black
#251326black

Contrast

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

Light mode
Text on background19.76:1AAA
Text on card19.45:1AAA
Primary button7.72:1AAA
Secondary button8.98:1AAA
Muted text6.13:1AA
Accent8.98:1AAA
Destructive5.68:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.67:1AAA
Primary button7.72:1AAA
Secondary button8.98:1AAA
Muted text7.78:1AAA
Accent8.98:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 324.648);
  --foreground: oklch(0.124 0.03 326.253);
  --muted: oklch(0.894 0.006 144.575);
  --muted-foreground: oklch(0.419 0.03 144.142);
  --popover: oklch(0.982 0.009 324.678);
  --popover-foreground: oklch(0.108 0.026 326.335);
  --card: oklch(0.982 0.009 324.678);
  --card-foreground: oklch(0.108 0.026 326.335);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.219 0.045 325.794);
  --primary-foreground: oklch(0.754 0.089 325.328);
  --secondary: oklch(0.245 0.043 143.409);
  --secondary-foreground: oklch(0.804 0.086 143.897);
  --accent: oklch(0.245 0.043 143.409);
  --accent-foreground: oklch(0.804 0.086 143.897);
  --destructive: oklch(0.536 0.201 30.056);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.219 0.045 325.794);
  --chart-1: oklch(0.219 0.045 325.794);
  --chart-2: oklch(0.245 0.043 143.409);
  --chart-3: oklch(0.245 0.043 143.409);
  --chart-4: oklch(0.282 0.052 143.331);
  --chart-5: oklch(0.219 0.049 325.877);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.003 324.636);
  --muted: oklch(0.262 0.008 144.414);
  --muted-foreground: oklch(0.781 0.026 144.402);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.219 0.045 325.794);
  --primary-foreground: oklch(0.754 0.089 325.328);
  --secondary: oklch(0.245 0.043 143.409);
  --secondary-foreground: oklch(0.804 0.086 143.897);
  --accent: oklch(0.245 0.043 143.409);
  --accent-foreground: oklch(0.804 0.086 143.897);
  --destructive: oklch(0.643 0.196 28.842);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.219 0.045 325.794);
  --chart-1: oklch(0.219 0.045 325.794);
  --chart-2: oklch(0.245 0.043 143.409);
  --chart-3: oklch(0.245 0.043 143.409);
  --chart-4: oklch(0.282 0.052 143.331);
  --chart-5: oklch(0.219 0.049 325.877);
}