Lighthearted for shadcn/ui

Lighthearted is a shadcn/ui theme built around a light purple primary color (#ecdae7) with light red accents (#ecdade). The light mode uses a neutral background (#ffffff). Dark mode keeps the light purple primary (#ecdae7) on a purple-tinted background (#10050d).

Color palette

TokenLightDark
Background
#ffffffwhite
#10050dblack
Foreground
#0e020ablack
#fdfcfdwhite
Card
#fcfcfcsnow
#140610black
Card foreground
#090107black
#ffffffwhite
Popover
#ffffffwhite
#10050dblack
Popover foreground
#0e020ablack
#fdfcfdwhite
Primary
#ecdae7gainsboro
#ecdae7gainsboro
Primary foreground
#623255dimgray
#623255dimgray
Secondary
#e8daeclavender
#e8daeclavender
Secondary foreground
#583262darkslateblue
#583262darkslateblue
Muted
#ebddeelavender
#1f1122black
Muted foreground
#5e5760dimgray
#a69fa8darkgray
Accent
#ecdadegainsboro
#ecdadegainsboro
Accent foreground
#62323cdarkolivegreen
#62323cdarkolivegreen
Destructive
#6a110bmaroon
#e83326crimson
Destructive foreground
#f7b5b1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ecdae7gainsboro
#ecdae7gainsboro

Contrast

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

Light mode
Text on background20.35:1AAA
Text on card20.16:1AAA
Primary button7.46:1AAA
Secondary button7.64:1AAA
Muted text5.33:1AA
Accent7.65:1AAA
Destructive7.16:1AAA
Dark mode
Text on background19.59:1AAA
Text on card19.78:1AAA
Primary button7.46:1AAA
Secondary button7.64:1AAA
Muted text7.03:1AAA
Accent7.65:1AAA
Destructive4.25:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.119 0.038 336.864);
  --muted: oklch(0.913 0.028 318.88);
  --muted-foreground: oklch(0.468 0.017 318.878);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.119 0.038 336.864);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.103 0.033 336.054);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.906 0.027 335.72);
  --primary-foreground: oklch(0.391 0.085 338.849);
  --secondary: oklch(0.905 0.029 318.879);
  --secondary-foreground: oklch(0.384 0.092 318.67);
  --accent: oklch(0.904 0.021 2.701);
  --accent-foreground: oklch(0.382 0.071 7.206);
  --destructive: oklch(0.342 0.123 29.292);
  --destructive-foreground: oklch(0.833 0.077 23.476);
  --ring: oklch(0.906 0.027 335.72);
  --chart-1: oklch(0.906 0.027 335.72);
  --chart-2: oklch(0.905 0.029 318.879);
  --chart-3: oklch(0.904 0.021 2.701);
  --chart-4: oklch(0.931 0.021 318.882);
  --chart-5: oklch(0.905 0.029 335.768);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.029 337.386);
  --foreground: oklch(0.992 0.002 335.228);
  --muted: oklch(0.204 0.04 318.752);
  --muted-foreground: oklch(0.71 0.015 318.883);
  --popover: oklch(0.137 0.029 337.386);
  --popover-foreground: oklch(0.992 0.002 335.228);
  --card: oklch(0.15 0.033 338.237);
  --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.906 0.027 335.72);
  --primary-foreground: oklch(0.391 0.085 338.849);
  --secondary: oklch(0.905 0.029 318.879);
  --secondary-foreground: oklch(0.384 0.092 318.67);
  --accent: oklch(0.904 0.021 2.701);
  --accent-foreground: oklch(0.382 0.071 7.206);
  --destructive: oklch(0.608 0.218 29.273);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.906 0.027 335.72);
  --chart-1: oklch(0.906 0.027 335.72);
  --chart-2: oklch(0.905 0.029 318.879);
  --chart-3: oklch(0.904 0.021 2.701);
  --chart-4: oklch(0.931 0.021 318.882);
  --chart-5: oklch(0.905 0.029 335.768);
}