Loving for shadcn/ui

Loving is a shadcn/ui theme built around a muted light yellow primary color (#c8c6bc) with muted light blue accents (#bcbdc8). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light yellow primary (#c8c6bc) on a neutral background (#040301).

Color palette

TokenLightDark
Background
#ffffffwhite
#040301black
Foreground
#040401black
#fafaf4floralwhite
Card
#fcfcfcsnow
#080703black
Card foreground
#000000black
#fcfbf8snow
Popover
#fcfcfcsnow
#080703black
Popover foreground
#000000black
#fcfbf8snow
Primary
#c8c6bcsilver
#c8c6bcsilver
Primary foreground
#2d2c25darkslategray
#2d2c25darkslategray
Secondary
#bcbdc8silver
#bcbdc8silver
Secondary foreground
#25262ddarkslategray
#25262ddarkslategray
Muted
#cacee7lightgrey
#181b35midnightblue
Muted foreground
#42434ddarkslategray
#b2b3bdsilver
Accent
#bcbdc8silver
#bcbdc8silver
Accent foreground
#25262ddarkslategray
#25262ddarkslategray
Destructive
#d2560fchocolate
#f17e3bcoral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c8c6bcsilver
#c8c6bcsilver

Contrast

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

Light mode
Text on background20.52:1AAA
Text on card20.54:1AAA
Primary button8.20:1AAA
Secondary button8.07:1AAA
Muted text6.28:1AA
Accent8.07:1AAA
Destructive4.13:1AA Large
Dark mode
Text on background19.64:1AAA
Text on card19.49:1AAA
Primary button8.20:1AAA
Secondary button8.07:1AAA
Muted text8.08:1AAA
Accent8.07:1AAA
Destructive7.81:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.102 0.013 103.709);
  --muted: oklch(0.856 0.036 279.645);
  --muted-foreground: oklch(0.386 0.017 279.598);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.826 0.015 100.602);
  --primary-foreground: oklch(0.291 0.013 100.96);
  --secondary: oklch(0.801 0.015 280.028);
  --secondary-foreground: oklch(0.269 0.013 279.505);
  --accent: oklch(0.801 0.015 280.028);
  --accent-foreground: oklch(0.269 0.013 279.505);
  --destructive: oklch(0.606 0.172 43.689);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.826 0.015 100.602);
  --chart-1: oklch(0.826 0.015 100.602);
  --chart-2: oklch(0.801 0.015 280.028);
  --chart-3: oklch(0.801 0.015 280.028);
  --chart-4: oklch(0.826 0.013 280.077);
  --chart-5: oklch(0.83 0.019 100.678);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.011 103.271);
  --foreground: oklch(0.983 0.007 100.436);
  --muted: oklch(0.234 0.049 276.184);
  --muted-foreground: oklch(0.769 0.014 280.034);
  --popover: oklch(0.127 0.014 103.271);
  --popover-foreground: oklch(0.989 0.005 100.401);
  --card: oklch(0.127 0.014 103.271);
  --card-foreground: oklch(0.989 0.005 100.401);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.826 0.015 100.602);
  --primary-foreground: oklch(0.291 0.013 100.96);
  --secondary: oklch(0.801 0.015 280.028);
  --secondary-foreground: oklch(0.269 0.013 279.505);
  --accent: oklch(0.801 0.015 280.028);
  --accent-foreground: oklch(0.269 0.013 279.505);
  --destructive: oklch(0.713 0.162 47.867);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.826 0.015 100.602);
  --chart-1: oklch(0.826 0.015 100.602);
  --chart-2: oklch(0.801 0.015 280.028);
  --chart-3: oklch(0.801 0.015 280.028);
  --chart-4: oklch(0.826 0.013 280.077);
  --chart-5: oklch(0.83 0.019 100.678);
}