Lighthearted for shadcn/ui

Lighthearted is a shadcn/ui theme built around a purple primary color (#c67bc0) with pink accents (#c67b9a). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the purple primary (#c67bc0) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#040103black
Foreground
#150513black
#ffffffwhite
Card
#fcf8fcsnow
#040103black
Card foreground
#150513black
#ffffffwhite
Popover
#fcf8fcsnow
#040103black
Popover foreground
#150513black
#ffffffwhite
Primary
#c67bc0orchid
#c67bc0orchid
Primary foreground
#0b050ablack
#0b050ablack
Secondary
#a77bc6mediumpurple
#a77bc6mediumpurple
Secondary foreground
#08050bblack
#08050bblack
Muted
#ece4f1lavender
#150e1bblack
Muted foreground
#575459dimgray
#a9a6abdarkgray
Accent
#c67b9apalevioletred
#c67b9apalevioletred
Accent foreground
#0b0507black
#0b0507black
Destructive
#c1230bfirebrick
#f34a30tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c67bc0orchid
#c67bc0orchid

Contrast

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

Light mode
Text on background18.76:1AAA
Text on card18.76:1AAA
Primary button6.73:1AA
Secondary button6.06:1AA
Muted text6.02:1AA
Accent6.45:1AA
Destructive5.97:1AA
Dark mode
Text on background20.74:1AAA
Text on card20.74:1AAA
Primary button6.73:1AA
Secondary button6.06:1AA
Muted text7.84:1AAA
Accent6.45:1AA
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.007 328.135);
  --foreground: oklch(0.151 0.042 330.444);
  --muted: oklch(0.929 0.018 311.568);
  --muted-foreground: oklch(0.451 0.009 311.56);
  --popover: oklch(0.983 0.007 328.135);
  --popover-foreground: oklch(0.151 0.042 330.444);
  --card: oklch(0.983 0.007 328.135);
  --card-foreground: oklch(0.151 0.042 330.444);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.686 0.13 329.88);
  --primary-foreground: oklch(0.127 0.02 329.052);
  --secondary: oklch(0.654 0.119 310.206);
  --secondary-foreground: oklch(0.123 0.018 312.919);
  --accent: oklch(0.672 0.101 353.637);
  --accent-foreground: oklch(0.125 0.015 349.471);
  --destructive: oklch(0.524 0.195 31.378);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.686 0.13 329.88);
  --chart-1: oklch(0.686 0.13 329.88);
  --chart-2: oklch(0.654 0.119 310.206);
  --chart-3: oklch(0.672 0.101 353.637);
  --chart-4: oklch(0.683 0.109 310.411);
  --chart-5: oklch(0.685 0.139 330.001);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.015 329.072);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.181 0.027 310.507);
  --muted-foreground: oklch(0.728 0.008 311.634);
  --popover: oklch(0.087 0.015 329.072);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.087 0.015 329.072);
  --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.686 0.13 329.88);
  --primary-foreground: oklch(0.127 0.02 329.052);
  --secondary: oklch(0.654 0.119 310.206);
  --secondary-foreground: oklch(0.123 0.018 312.919);
  --accent: oklch(0.672 0.101 353.637);
  --accent-foreground: oklch(0.125 0.015 349.471);
  --destructive: oklch(0.647 0.21 31.619);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.686 0.13 329.88);
  --chart-1: oklch(0.686 0.13 329.88);
  --chart-2: oklch(0.654 0.119 310.206);
  --chart-3: oklch(0.672 0.101 353.637);
  --chart-4: oklch(0.683 0.109 310.411);
  --chart-5: oklch(0.685 0.139 330.001);
}