Darling for shadcn/ui

Darling is a shadcn/ui theme built around a purple primary color (#bf47d1) with pink accents (#d1479f). The light mode uses a neutral background (#fefbfe). Dark mode keeps the purple primary (#bf47d1) on a purple-tinted background (#09050a).

Color palette

TokenLightDark
Background
#fefbfewhite
#09050ablack
Foreground
#0f0410black
#fdfcfdwhite
Card
#fefbfewhite
#09050ablack
Card foreground
#0f0410black
#fdfcfdwhite
Popover
#fefbfewhite
#09050ablack
Popover foreground
#0f0410black
#fdfcfdwhite
Primary
#bf47d1mediumorchid
#bf47d1mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7a47d1slateblue
#7a47d1slateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dfdbe6gainsboro
#1d1924black
Muted foreground
#403f40darkslategray
#bfbfc0silver
Accent
#d1479fpalevioletred
#d1479fpalevioletred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b1350bfirebrick
#f2683atomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bf47d1mediumorchid
#bf47d1mediumorchid

Contrast

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

Light mode
Text on background19.54:1AAA
Text on card19.54:1AAA
Primary button4.16:1AA Large
Secondary button5.73:1AA
Muted text7.70:1AAA
Accent4.09:1AA Large
Destructive6.19:1AA
Dark mode
Text on background19.73:1AAA
Text on card19.73:1AAA
Primary button4.16:1AA Large
Secondary button5.73:1AA
Muted text9.36:1AAA
Accent4.09:1AA Large
Destructive6.85:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 321.605);
  --foreground: oklch(0.136 0.033 322.695);
  --muted: oklch(0.898 0.015 302.681);
  --muted-foreground: oklch(0.369 0.002 302.836);
  --popover: oklch(0.991 0.005 321.605);
  --popover-foreground: oklch(0.136 0.033 322.695);
  --card: oklch(0.991 0.005 321.605);
  --card-foreground: oklch(0.136 0.033 322.695);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.615 0.221 322.084);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.533 0.201 295.611);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.616 0.195 345.361);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.511 0.167 36.256);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.615 0.221 322.084);
  --chart-1: oklch(0.615 0.221 322.084);
  --chart-2: oklch(0.533 0.201 295.611);
  --chart-3: oklch(0.616 0.195 345.361);
  --chart-4: oklch(0.561 0.189 296.727);
  --chart-5: oklch(0.617 0.23 322.055);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.015 322.541);
  --foreground: oklch(0.992 0.002 321.597);
  --muted: oklch(0.224 0.021 301.512);
  --muted-foreground: oklch(0.804 0.002 302.894);
  --popover: oklch(0.127 0.015 322.541);
  --popover-foreground: oklch(0.992 0.002 321.597);
  --card: oklch(0.127 0.015 322.541);
  --card-foreground: oklch(0.992 0.002 321.597);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.615 0.221 322.084);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.533 0.201 295.611);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.616 0.195 345.361);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.683 0.181 38.374);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.615 0.221 322.084);
  --chart-1: oklch(0.615 0.221 322.084);
  --chart-2: oklch(0.533 0.201 295.611);
  --chart-3: oklch(0.616 0.195 345.361);
  --chart-4: oklch(0.561 0.189 296.727);
  --chart-5: oklch(0.617 0.23 322.055);
}