Old for shadcn/ui

Old is a shadcn/ui theme built around a muted purple primary color (#a276a2) with muted light purple accents (#cabaca). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#a276a2) on a purple-tinted background (#0f050f).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f050fblack
Foreground
#050105black
#f9f6f9whitesmoke
Card
#ffffffwhite
#0f050fblack
Card foreground
#050105black
#f9f6f9whitesmoke
Popover
#ffffffwhite
#0f050fblack
Popover foreground
#050105black
#f9f6f9whitesmoke
Primary
#a276a2rosybrown
#a276a2rosybrown
Primary foreground
#000000black
#000000black
Secondary
#ded8degainsboro
#211821black
Secondary foreground
#483d48darkslategray
#c1a9c1silver
Muted
#e9d8e9gainsboro
#271627black
Muted foreground
#504e50darkslategray
#b1afb1darkgray
Accent
#cabacasilver
#392239darkslategray
Accent foreground
#2e232edarkslategray
#d5b9d5thistle
Destructive
#b43608firebrick
#f66e3ctomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a276a2rosybrown
#a276a2rosybrown

Contrast

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

Light mode
Text on background20.73:1AAA
Text on card20.73:1AAA
Primary button5.67:1AA
Secondary button7.38:1AAA
Muted text6.06:1AA
Accent8.14:1AAA
Destructive6.03:1AA
Dark mode
Text on background18.64:1AAA
Text on card18.64:1AAA
Primary button5.67:1AA
Secondary button8.01:1AAA
Muted text7.82:1AAA
Accent7.98:1AAA
Destructive7.19:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.084 0.028 327.748);
  --muted: oklch(0.901 0.03 325.819);
  --muted-foreground: oklch(0.427 0.003 325.634);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.084 0.028 327.748);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.084 0.028 327.748);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.626 0.082 326.497);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.89 0.01 325.659);
  --secondary-foreground: oklch(0.375 0.023 326.02);
  --accent: oklch(0.806 0.028 325.835);
  --accent-foreground: oklch(0.275 0.025 326.219);
  --destructive: oklch(0.518 0.169 36.779);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.626 0.082 326.497);
  --chart-1: oklch(0.626 0.082 326.497);
  --chart-2: oklch(0.89 0.01 325.659);
  --chart-3: oklch(0.806 0.028 325.835);
  --chart-4: oklch(0.914 0.008 325.639);
  --chart-5: oklch(0.624 0.094 326.631);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.029 326.997);
  --foreground: oklch(0.976 0.006 325.622);
  --muted: oklch(0.231 0.041 326.793);
  --muted-foreground: oklch(0.756 0.003 325.604);
  --popover: oklch(0.14 0.029 326.997);
  --popover-foreground: oklch(0.976 0.006 325.622);
  --card: oklch(0.14 0.029 326.997);
  --card-foreground: oklch(0.976 0.006 325.622);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.626 0.082 326.497);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.222 0.022 326.282);
  --secondary-foreground: oklch(0.763 0.042 325.984);
  --accent: oklch(0.293 0.051 326.79);
  --accent-foreground: oklch(0.818 0.049 326.019);
  --destructive: oklch(0.695 0.179 39.589);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.626 0.082 326.497);
  --chart-1: oklch(0.626 0.082 326.497);
  --chart-2: oklch(0.222 0.022 326.282);
  --chart-3: oklch(0.293 0.051 326.79);
  --chart-4: oklch(0.254 0.027 326.334);
  --chart-5: oklch(0.624 0.094 326.631);
}