Soft for shadcn/ui

Soft is a shadcn/ui theme built around a muted violet primary color (#5b4766) with muted light violet accents (#d1c6d7). The light mode uses a neutral background (#faf8fc). Dark mode keeps the muted violet primary (#5b4766) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#000000black
Foreground
#030104black
#fdfcfdwhite
Card
#faf8fcghostwhite
#000000black
Card foreground
#030104black
#fdfcfdwhite
Popover
#faf8fcghostwhite
#000000black
Popover foreground
#030104black
#fdfcfdwhite
Primary
#5b4766dimgray
#5b4766dimgray
Primary foreground
#f0edf2whitesmoke
#f0edf2whitesmoke
Secondary
#d1c6d7thistle
#1c1b1dblack
Secondary foreground
#382c3fdarkslategray
#b6b3b7silver
Muted
#dfd9e2gainsboro
#221d26black
Muted foreground
#504b53darkslategray
#b1acb4darkgray
Accent
#d1c6d7thistle
#1c1b1dblack
Accent foreground
#382c3fdarkslategray
#b6b3b7silver
Destructive
#790b0bmaroon
#e01515crimson
Destructive foreground
#f9bebelightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5b4766dimgray
#5b4766dimgray

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.74:1AAA
Primary button7.12:1AAA
Secondary button7.96:1AAA
Muted text6.14:1AA
Accent7.96:1AAA
Destructive7.01:1AAA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button7.12:1AAA
Secondary button8.25:1AAA
Muted text7.43:1AAA
Accent8.25:1AAA
Destructive4.89:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 313.575);
  --foreground: oklch(0.083 0.017 315.345);
  --muted: oklch(0.893 0.014 313.509);
  --muted-foreground: oklch(0.421 0.014 313.395);
  --popover: oklch(0.982 0.005 313.575);
  --popover-foreground: oklch(0.083 0.017 315.345);
  --card: oklch(0.982 0.005 313.575);
  --card-foreground: oklch(0.083 0.017 315.345);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.431 0.056 312.798);
  --primary-foreground: oklch(0.95 0.008 313.552);
  --secondary: oklch(0.84 0.027 313.41);
  --secondary-foreground: oklch(0.315 0.037 312.867);
  --accent: oklch(0.84 0.027 313.41);
  --accent-foreground: oklch(0.315 0.037 312.867);
  --destructive: oklch(0.369 0.142 27.91);
  --destructive-foreground: oklch(0.854 0.069 18.587);
  --ring: oklch(0.431 0.056 312.798);
  --chart-1: oklch(0.431 0.056 312.798);
  --chart-2: oklch(0.84 0.027 313.41);
  --chart-3: oklch(0.84 0.027 313.41);
  --chart-4: oklch(0.866 0.022 313.447);
  --chart-5: oklch(0.428 0.065 312.647);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 313.591);
  --muted: oklch(0.24 0.019 313.108);
  --muted-foreground: oklch(0.751 0.012 313.503);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.002 313.591);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.991 0.002 313.591);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.431 0.056 312.798);
  --primary-foreground: oklch(0.95 0.008 313.552);
  --secondary: oklch(0.225 0.004 313.507);
  --secondary-foreground: oklch(0.77 0.007 313.55);
  --accent: oklch(0.225 0.004 313.507);
  --accent-foreground: oklch(0.77 0.007 313.55);
  --destructive: oklch(0.575 0.228 28.463);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.431 0.056 312.798);
  --chart-1: oklch(0.431 0.056 312.798);
  --chart-2: oklch(0.225 0.004 313.507);
  --chart-3: oklch(0.225 0.004 313.507);
  --chart-4: oklch(0.257 0.004 313.5);
  --chart-5: oklch(0.428 0.065 312.647);
}