Loving for shadcn/ui

Loving is a shadcn/ui theme built around a blue primary color (#515c9e) with yellow accents (#9e9451). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#515c9e) on a neutral background (#040407).

Color palette

TokenLightDark
Background
#ffffffwhite
#040407black
Foreground
#030511black
#f8f9fcghostwhite
Card
#ffffffwhite
#040407black
Card foreground
#030511black
#f8f9fcghostwhite
Popover
#ffffffwhite
#040407black
Popover foreground
#030511black
#f8f9fcghostwhite
Primary
#515c9edarkslateblue
#515c9edarkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#9e9451peru
#9e9451peru
Secondary foreground
#000000black
#000000black
Muted
#e3e0cfgainsboro
#302e1cdarkslategray
Muted foreground
#5f5f5ddimgray
#a2a1a0darkgray
Accent
#9e9451peru
#9e9451peru
Accent foreground
#000000black
#000000black
Destructive
#cd470achocolate
#f67437tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#515c9edarkslateblue
#515c9edarkslateblue

Contrast

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

Light mode
Text on background20.31:1AAA
Text on card20.31:1AAA
Primary button6.23:1AA
Secondary button6.81:1AA
Muted text4.82:1AA
Accent6.81:1AA
Destructive4.66:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.46:1AAA
Primary button6.23:1AA
Secondary button6.81:1AA
Muted text5.33:1AA
Accent6.81:1AA
Destructive7.43: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.122 0.029 271.456);
  --muted: oklch(0.904 0.023 99.707);
  --muted-foreground: oklch(0.485 0.003 99.42);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.122 0.029 271.456);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.122 0.029 271.456);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.497 0.106 275.235);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.66 0.088 100.685);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.66 0.088 100.685);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.578 0.179 39.505);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.497 0.106 275.235);
  --chart-1: oklch(0.497 0.106 275.235);
  --chart-2: oklch(0.66 0.088 100.685);
  --chart-3: oklch(0.66 0.088 100.685);
  --chart-4: oklch(0.691 0.093 100.686);
  --chart-5: oklch(0.491 0.116 274.705);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.009 276.53);
  --foreground: oklch(0.981 0.004 279.274);
  --muted: oklch(0.297 0.029 100.504);
  --muted-foreground: oklch(0.71 0.002 99.39);
  --popover: oklch(0.108 0.009 276.53);
  --popover-foreground: oklch(0.981 0.004 279.274);
  --card: oklch(0.108 0.009 276.53);
  --card-foreground: oklch(0.981 0.004 279.274);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.497 0.106 275.235);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.66 0.088 100.685);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.66 0.088 100.685);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.703 0.175 43.186);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.497 0.106 275.235);
  --chart-1: oklch(0.497 0.106 275.235);
  --chart-2: oklch(0.66 0.088 100.685);
  --chart-3: oklch(0.66 0.088 100.685);
  --chart-4: oklch(0.691 0.093 100.686);
  --chart-5: oklch(0.491 0.116 274.705);
}