Hearty for shadcn/ui

Hearty is a shadcn/ui theme built around a muted indigo primary color (#9790bb) with muted violet accents (#ad90bb). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted indigo primary (#9790bb) on a neutral background (#030208).

Color palette

TokenLightDark
Background
#ffffffwhite
#030208black
Foreground
#030208black
#f9f9fbghostwhite
Card
#ffffffwhite
#030208black
Card foreground
#030208black
#f9f9fbghostwhite
Popover
#ffffffwhite
#030208black
Popover foreground
#030208black
#f9f9fbghostwhite
Primary
#9790bbdarkgray
#9790bbdarkgray
Primary foreground
#0b0a10black
#0b0a10black
Secondary
#909fbbdarkgray
#909fbbdarkgray
Secondary foreground
#0a0c10black
#0a0c10black
Muted
#e5e7eblavender
#14161ablack
Muted foreground
#4c515ddarkslategray
#a2a8b3darkgray
Accent
#ad90bbdarkgray
#ad90bbdarkgray
Accent foreground
#0e0a10black
#0e0a10black
Destructive
#92240csaddlebrown
#ed4b26chocolate
Destructive foreground
#fcdcd5mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9790bbdarkgray
#9790bbdarkgray

Contrast

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

Light mode
Text on background20.66:1AAA
Text on card20.66:1AAA
Primary button6.62:1AA
Secondary button7.30:1AAA
Muted text6.42:1AA
Accent7.01:1AAA
Destructive6.56:1AA
Dark mode
Text on background19.62:1AAA
Text on card19.62:1AAA
Primary button6.62:1AA
Secondary button7.30:1AAA
Muted text7.58:1AAA
Accent7.01:1AAA
Destructive3.72:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.019 292.703);
  --muted: oklch(0.928 0.006 264.531);
  --muted-foreground: oklch(0.435 0.02 264.345);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.099 0.019 292.703);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.099 0.019 292.703);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.676 0.063 292.267);
  --primary-foreground: oklch(0.148 0.013 292.354);
  --secondary: oklch(0.7 0.045 264.226);
  --secondary-foreground: oklch(0.153 0.009 264.238);
  --accent: oklch(0.695 0.069 314.341);
  --accent-foreground: oklch(0.152 0.014 314.363);
  --destructive: oklch(0.438 0.149 33.526);
  --destructive-foreground: oklch(0.918 0.037 32.723);
  --ring: oklch(0.676 0.063 292.267);
  --chart-1: oklch(0.676 0.063 292.267);
  --chart-2: oklch(0.7 0.045 264.226);
  --chart-3: oklch(0.695 0.069 314.341);
  --chart-4: oklch(0.726 0.041 264.28);
  --chart-5: oklch(0.67 0.071 292.007);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.02 292.626);
  --foreground: oklch(0.982 0.004 293.999);
  --muted: oklch(0.2 0.009 264.361);
  --muted-foreground: oklch(0.731 0.017 264.461);
  --popover: oklch(0.098 0.02 292.626);
  --popover-foreground: oklch(0.982 0.004 293.999);
  --card: oklch(0.098 0.02 292.626);
  --card-foreground: oklch(0.982 0.004 293.999);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.676 0.063 292.267);
  --primary-foreground: oklch(0.148 0.013 292.354);
  --secondary: oklch(0.7 0.045 264.226);
  --secondary-foreground: oklch(0.153 0.009 264.238);
  --accent: oklch(0.695 0.069 314.341);
  --accent-foreground: oklch(0.152 0.014 314.363);
  --destructive: oklch(0.638 0.205 33.885);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.676 0.063 292.267);
  --chart-1: oklch(0.676 0.063 292.267);
  --chart-2: oklch(0.7 0.045 264.226);
  --chart-3: oklch(0.695 0.069 314.341);
  --chart-4: oklch(0.726 0.041 264.28);
  --chart-5: oklch(0.67 0.071 292.007);
}