Peaceful for shadcn/ui

Peaceful is a shadcn/ui theme built around a muted purple primary color (#9e7aa8) with muted purple accents (#a87a9c). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted purple primary (#9e7aa8) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#030104black
#f8f7f8whitesmoke
Card
#fbf8fcghostwhite
#030303black
Card foreground
#000000black
#faf9fasnow
Popover
#fdfbfewhite
#000000black
Popover foreground
#030104black
#f8f7f8whitesmoke
Primary
#9e7aa8lightslategray
#9e7aa8lightslategray
Primary foreground
#000000black
#000000black
Secondary
#877aa8lightslategray
#877aa8lightslategray
Secondary foreground
#000000black
#000000black
Muted
#d2cbe7thistle
#201834midnightblue
Muted foreground
#514e5adarkslategray
#a8a5b1darkgray
Accent
#a87a9crosybrown
#a87a9crosybrown
Accent foreground
#000000black
#000000black
Destructive
#a5120dfirebrick
#ec1a13red
Destructive foreground
#fde8e7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9e7aa8lightslategray
#9e7aa8lightslategray

Contrast

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

Light mode
Text on background20.24:1AAA
Text on card19.89:1AAA
Primary button5.81:1AA
Secondary button5.39:1AA
Muted text5.17:1AA
Accent5.95:1AA
Destructive6.62:1AA
Dark mode
Text on background19.65:1AAA
Text on card19.69:1AAA
Primary button5.81:1AA
Secondary button5.39:1AA
Muted text6.98:1AA
Accent5.95:1AA
Destructive4.44:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 318.327);
  --foreground: oklch(0.084 0.018 320.168);
  --muted: oklch(0.856 0.04 297.753);
  --muted-foreground: oklch(0.432 0.02 297.772);
  --popover: oklch(0.991 0.003 318.327);
  --popover-foreground: oklch(0.084 0.018 320.168);
  --card: oklch(0.982 0.007 318.323);
  --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.631 0.079 318.193);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.609 0.07 296.5);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.637 0.074 336.429);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.461 0.179 28.947);
  --destructive-foreground: oklch(0.948 0.023 19.954);
  --ring: oklch(0.631 0.079 318.193);
  --chart-1: oklch(0.631 0.079 318.193);
  --chart-2: oklch(0.609 0.07 296.5);
  --chart-3: oklch(0.637 0.074 336.429);
  --chart-4: oklch(0.638 0.064 296.76);
  --chart-5: oklch(0.628 0.09 318.167);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.976 0.003 318.328);
  --muted: oklch(0.234 0.054 294.166);
  --muted-foreground: oklch(0.728 0.017 298.154);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.976 0.003 318.328);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.984 0.002 318.328);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.631 0.079 318.193);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.609 0.07 296.5);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.637 0.074 336.429);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.599 0.236 29.1);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.631 0.079 318.193);
  --chart-1: oklch(0.631 0.079 318.193);
  --chart-2: oklch(0.609 0.07 296.5);
  --chart-3: oklch(0.637 0.074 336.429);
  --chart-4: oklch(0.638 0.064 296.76);
  --chart-5: oklch(0.628 0.09 318.167);
}