Kindhearted for shadcn/ui

Kindhearted is a shadcn/ui theme built around a muted light violet primary color (#f4f2f8) with muted light green accents (#f2f8f4). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted light violet primary (#f4f2f8) on a neutral background (#050208).

Color palette

TokenLightDark
Background
#fcfbfewhite
#050208black
Foreground
#020105black
#f7f6f9whitesmoke
Card
#f9f7fdghostwhite
#07040cblack
Card foreground
#000000black
#faf9fbghostwhite
Popover
#f9f7fdghostwhite
#07040cblack
Popover foreground
#000000black
#faf9fbghostwhite
Primary
#f4f2f8whitesmoke
#f4f2f8whitesmoke
Primary foreground
#584176darkslateblue
#584176darkslateblue
Secondary
#f8f4f2whitesmoke
#f8f4f2whitesmoke
Secondary foreground
#35271ddarkslategray
#35271ddarkslategray
Muted
#ebdfd6gainsboro
#291d14black
Muted foreground
#5b5652dimgray
#ada8a4darkgray
Accent
#f2f8f4whitesmoke
#f2f8f4whitesmoke
Accent foreground
#1d3527darkslategray
#1d3527darkslategray
Destructive
#87320dsaddlebrown
#ec7441tomato
Destructive foreground
#fadaccbisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f4f2f8whitesmoke
#f4f2f8whitesmoke

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card19.72:1AAA
Primary button7.76:1AAA
Secondary button13.19:1AAA
Muted text5.53:1AA
Accent12.24:1AAA
Destructive6.43:1AA
Dark mode
Text on background19.11:1AAA
Text on card19.42:1AAA
Primary button7.76:1AAA
Secondary button13.19:1AAA
Muted text6.95:1AA
Accent12.24:1AAA
Destructive7.15:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 305.678);
  --foreground: oklch(0.074 0.026 307.771);
  --muted: oklch(0.911 0.018 60.015);
  --muted-foreground: oklch(0.457 0.009 60.019);
  --popover: oklch(0.979 0.009 305.616);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.009 305.616);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.964 0.008 305.625);
  --primary-foreground: oklch(0.425 0.089 302.771);
  --secondary: oklch(0.97 0.005 60.213);
  --secondary-foreground: oklch(0.286 0.027 58.822);
  --accent: oklch(0.973 0.008 161.617);
  --accent-foreground: oklch(0.303 0.039 158.196);
  --destructive: oklch(0.433 0.125 40.378);
  --destructive-foreground: oklch(0.911 0.041 44.586);
  --ring: oklch(0.964 0.008 305.625);
  --chart-1: oklch(0.964 0.008 305.625);
  --chart-2: oklch(0.97 0.005 60.213);
  --chart-3: oklch(0.973 0.008 161.617);
  --chart-4: oklch(0.993 0.001 60.266);
  --chart-5: oklch(0.964 0.009 305.613);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.02 306.892);
  --foreground: oklch(0.974 0.004 305.678);
  --muted: oklch(0.243 0.025 58.676);
  --muted-foreground: oklch(0.734 0.008 60.137);
  --popover: oklch(0.117 0.023 306.713);
  --popover-foreground: oklch(0.983 0.003 305.699);
  --card: oklch(0.117 0.023 306.713);
  --card-foreground: oklch(0.983 0.003 305.699);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.964 0.008 305.625);
  --primary-foreground: oklch(0.425 0.089 302.771);
  --secondary: oklch(0.97 0.005 60.213);
  --secondary-foreground: oklch(0.286 0.027 58.822);
  --accent: oklch(0.973 0.008 161.617);
  --accent-foreground: oklch(0.303 0.039 158.196);
  --destructive: oklch(0.691 0.162 42.478);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.964 0.008 305.625);
  --chart-1: oklch(0.964 0.008 305.625);
  --chart-2: oklch(0.97 0.005 60.213);
  --chart-3: oklch(0.973 0.008 161.617);
  --chart-4: oklch(0.993 0.001 60.266);
  --chart-5: oklch(0.964 0.009 305.613);
}