Beloved for shadcn/ui

Beloved is a shadcn/ui theme built around a neutral gray primary color (#4a4a4a) with near-white accents (#e9e7e7). The light mode uses a neutral background (#fefbfb). Dark mode keeps the neutral gray primary (#4a4a4a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfbsnow
#000000black
Foreground
#080202black
#fdfcfcsnow
Card
#fcf8f8snow
#030303black
Card foreground
#040101black
#ffffffwhite
Popover
#fcf8f8snow
#030303black
Popover foreground
#040101black
#ffffffwhite
Primary
#4a4a4adarkslategray
#4a4a4adarkslategray
Primary foreground
#e3e3e3gainsboro
#e3e3e3gainsboro
Secondary
#e9e7e7linen
#1b1313black
Secondary foreground
#524c4cdarkslategray
#bda3a3darkgray
Muted
#e5cccclightgrey
#331a1ablack
Muted foreground
#484242darkslategray
#bdb7b7silver
Accent
#e9e7e7linen
#1b1313black
Accent foreground
#524c4cdarkslategray
#bda3a3darkgray
Destructive
#74120bmaroon
#e93225crimson
Destructive foreground
#f8beb9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4a4a4adarkslategray
#4a4a4adarkslategray

Contrast

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

Light mode
Text on background20.04:1AAA
Text on card19.69:1AAA
Primary button6.91:1AA
Secondary button6.83:1AA
Muted text6.49:1AA
Accent6.83:1AA
Destructive7.10:1AAA
Dark mode
Text on background20.50:1AAA
Text on card20.67:1AAA
Primary button6.91:1AA
Secondary button7.76:1AAA
Muted text8.17:1AAA
Accent7.76:1AAA
Destructive4.23:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 17.196);
  --foreground: oklch(0.102 0.021 21.445);
  --muted: oklch(0.867 0.028 17.713);
  --muted-foreground: oklch(0.385 0.008 17.484);
  --popover: oklch(0.982 0.005 17.235);
  --popover-foreground: oklch(0.081 0.017 21.445);
  --card: oklch(0.982 0.005 17.235);
  --card-foreground: oklch(0.081 0.017 21.445);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.409 0 190.305);
  --primary-foreground: oklch(0.916 0 180);
  --secondary: oklch(0.93 0.002 17.193);
  --secondary-foreground: oklch(0.422 0.008 17.492);
  --accent: oklch(0.93 0.002 17.193);
  --accent-foreground: oklch(0.422 0.008 17.492);
  --destructive: oklch(0.363 0.132 29.4);
  --destructive-foreground: oklch(0.852 0.068 23.279);
  --ring: oklch(0.409 0 190.305);
  --chart-1: oklch(0.409 0 190.305);
  --chart-2: oklch(0.93 0.002 17.193);
  --chart-3: oklch(0.93 0.002 17.193);
  --chart-4: oklch(0.953 0.001 17.181);
  --chart-5: oklch(0.405 0.006 17.403);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.001 17.182);
  --muted: oklch(0.251 0.04 20.312);
  --muted-foreground: oklch(0.785 0.006 17.289);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.409 0 190.305);
  --primary-foreground: oklch(0.916 0 180);
  --secondary: oklch(0.197 0.012 18.233);
  --secondary-foreground: oklch(0.739 0.03 17.845);
  --accent: oklch(0.197 0.012 18.233);
  --accent-foreground: oklch(0.739 0.03 17.845);
  --destructive: oklch(0.609 0.22 29.323);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.409 0 190.305);
  --chart-1: oklch(0.409 0 190.305);
  --chart-2: oklch(0.197 0.012 18.233);
  --chart-3: oklch(0.197 0.012 18.233);
  --chart-4: oklch(0.229 0.016 18.363);
  --chart-5: oklch(0.405 0.006 17.403);
}