Loving for shadcn/ui

Loving is a shadcn/ui theme built around a muted violet primary color (#b8aac0) with muted teal accents (#aac0b8). The light mode uses a neutral background (#fbf7fd). Dark mode keeps the muted violet primary (#b8aac0) on a violet-tinted background (#08050a).

Color palette

TokenLightDark
Background
#fbf7fdghostwhite
#08050ablack
Foreground
#09020dblack
#f8f6f9whitesmoke
Card
#fbf7fdghostwhite
#08050ablack
Card foreground
#09020dblack
#f8f6f9whitesmoke
Popover
#fbf7fdghostwhite
#08050ablack
Popover foreground
#09020dblack
#f8f6f9whitesmoke
Primary
#b8aac0silver
#b8aac0silver
Primary foreground
#1d1820black
#1d1820black
Secondary
#c0b8aasilver
#c0b8aasilver
Secondary foreground
#201d18black
#201d18black
Muted
#e4ddd2gainsboro
#2d261bblack
Muted foreground
#5f5b53dimgray
#aca7a0darkgray
Accent
#aac0b8silver
#aac0b8silver
Accent foreground
#18201dblack
#18201dblack
Destructive
#cc3405firebrick
#f95624tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b8aac0silver
#b8aac0silver

Contrast

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

Light mode
Text on background19.30:1AAA
Text on card19.30:1AAA
Primary button7.92:1AAA
Secondary button8.51:1AAA
Muted text5.02:1AA
Accent8.66:1AAA
Destructive5.18:1AA
Dark mode
Text on background18.85:1AAA
Text on card18.85:1AAA
Primary button7.92:1AAA
Secondary button8.51:1AAA
Muted text6.27:1AA
Accent8.66:1AAA
Destructive6.39:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 312.927);
  --foreground: oklch(0.113 0.037 315.011);
  --muted: oklch(0.901 0.017 79.892);
  --muted-foreground: oklch(0.472 0.014 79.852);
  --popover: oklch(0.981 0.008 312.927);
  --popover-foreground: oklch(0.113 0.037 315.011);
  --card: oklch(0.981 0.008 312.927);
  --card-foreground: oklch(0.113 0.037 315.011);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.756 0.035 312.674);
  --primary-foreground: oklch(0.218 0.018 312.429);
  --secondary: oklch(0.785 0.021 79.86);
  --secondary-foreground: oklch(0.233 0.011 79.752);
  --accent: oklch(0.789 0.027 170.57);
  --accent-foreground: oklch(0.235 0.014 169.798);
  --destructive: oklch(0.556 0.195 34.566);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.756 0.035 312.674);
  --chart-1: oklch(0.756 0.035 312.674);
  --chart-2: oklch(0.785 0.021 79.86);
  --chart-3: oklch(0.789 0.027 170.57);
  --chart-4: oklch(0.808 0.019 79.874);
  --chart-5: oklch(0.753 0.042 312.61);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.017 314.145);
  --foreground: oklch(0.975 0.004 312.957);
  --muted: oklch(0.272 0.022 79.419);
  --muted-foreground: oklch(0.731 0.012 79.897);
  --popover: oklch(0.124 0.017 314.145);
  --popover-foreground: oklch(0.975 0.004 312.957);
  --card: oklch(0.124 0.017 314.145);
  --card-foreground: oklch(0.975 0.004 312.957);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.756 0.035 312.674);
  --primary-foreground: oklch(0.218 0.018 312.429);
  --secondary: oklch(0.785 0.021 79.86);
  --secondary-foreground: oklch(0.233 0.011 79.752);
  --accent: oklch(0.789 0.027 170.57);
  --accent-foreground: oklch(0.235 0.014 169.798);
  --destructive: oklch(0.669 0.208 36.344);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.756 0.035 312.674);
  --chart-1: oklch(0.756 0.035 312.674);
  --chart-2: oklch(0.785 0.021 79.86);
  --chart-3: oklch(0.789 0.027 170.57);
  --chart-4: oklch(0.808 0.019 79.874);
  --chart-5: oklch(0.753 0.042 312.61);
}