Loving for shadcn/ui

Loving is a shadcn/ui theme built around a neutral gray primary color (#6e6c68) with muted yellow accents (#c9bea6). The light mode uses a neutral background (#fdfbf6). Dark mode keeps the neutral gray primary (#6e6c68) on a yellow-tinted background (#0c0904).

Color palette

TokenLightDark
Background
#fdfbf6snow
#0c0904black
Foreground
#050301black
#fdfdfcwhite
Card
#fdfbf6snow
#0c0904black
Card foreground
#050301black
#fdfdfcwhite
Popover
#fdfbf6snow
#0c0904black
Popover foreground
#050301black
#fdfdfcwhite
Primary
#6e6c68dimgray
#6e6c68dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d6cfc2lightgrey
#343028darkslategray
Secondary foreground
#3d3629darkslategray
#cec9c0silver
Muted
#ede8deantiquewhite
#211c12black
Muted foreground
#756b57dimgray
#a89e8arosybrown
Accent
#c9bea6silver
#4a4130darkslategray
Accent foreground
#262117black
#dfd9celightgrey
Destructive
#c41812firebrick
#ea211acrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6e6c68dimgray
#6e6c68dimgray

Contrast

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

Light mode
Text on background19.93:1AAA
Text on card19.93:1AAA
Primary button5.22:1AA
Secondary button7.72:1AAA
Muted text4.30:1AA Large
Accent8.66:1AAA
Destructive6.02:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.54:1AAA
Primary button5.22:1AA
Secondary button7.97:1AAA
Muted text6.39:1AA
Accent7.11:1AAA
Destructive4.44:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.006 84.568);
  --foreground: oklch(0.1 0.016 92.778);
  --muted: oklch(0.932 0.014 84.584);
  --muted-foreground: oklch(0.532 0.033 84.513);
  --popover: oklch(0.989 0.006 84.568);
  --popover-foreground: oklch(0.1 0.016 92.778);
  --card: oklch(0.989 0.006 84.568);
  --card-foreground: oklch(0.1 0.016 92.778);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.532 0.007 84.581);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.857 0.019 84.591);
  --secondary-foreground: oklch(0.336 0.023 84.471);
  --accent: oklch(0.804 0.035 84.578);
  --accent-foreground: oklch(0.251 0.02 84.401);
  --destructive: oklch(0.524 0.203 28.943);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.532 0.007 84.581);
  --chart-1: oklch(0.532 0.007 84.581);
  --chart-2: oklch(0.857 0.019 84.591);
  --chart-3: oklch(0.804 0.035 84.578);
  --chart-4: oklch(0.879 0.016 84.588);
  --chart-5: oklch(0.537 0.014 84.593);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.015 89.781);
  --foreground: oklch(0.993 0.001 84.552);
  --muted: oklch(0.229 0.019 84.343);
  --muted-foreground: oklch(0.703 0.031 84.576);
  --popover: oklch(0.141 0.015 89.781);
  --popover-foreground: oklch(0.993 0.001 84.552);
  --card: oklch(0.141 0.015 89.781);
  --card-foreground: oklch(0.993 0.001 84.552);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.532 0.007 84.581);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.31 0.015 84.568);
  --secondary-foreground: oklch(0.838 0.014 84.586);
  --accent: oklch(0.381 0.03 84.403);
  --accent-foreground: oklch(0.887 0.017 84.588);
  --destructive: oklch(0.599 0.231 28.86);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.532 0.007 84.581);
  --chart-1: oklch(0.532 0.007 84.581);
  --chart-2: oklch(0.31 0.015 84.568);
  --chart-3: oklch(0.381 0.03 84.403);
  --chart-4: oklch(0.342 0.017 84.563);
  --chart-5: oklch(0.537 0.014 84.593);
}