Compassionate for shadcn/ui

Compassionate is a shadcn/ui theme built around a yellow primary color (#a1a145) with indigo accents (#4545a1). The light mode uses a neutral background (#fefefb). Dark mode keeps the yellow primary (#a1a145) on a yellow-tinted background (#0c0c03).

Color palette

TokenLightDark
Background
#fefefbwhite
#0c0c03black
Foreground
#080802black
#fbfbf9snow
Card
#fefefbwhite
#0c0c03black
Card foreground
#080802black
#fbfbf9snow
Popover
#fefefbwhite
#0c0c03black
Popover foreground
#080802black
#fbfbf9snow
Primary
#a1a145yellowgreen
#a1a145yellowgreen
Primary foreground
#121208black
#121208black
Secondary
#4545a1darkslateblue
#4545a1darkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#efeff5whitesmoke
#0a0a10black
Muted foreground
#4f4f4fdarkslategray
#b0b0b0darkgray
Accent
#4545a1darkslateblue
#4545a1darkslateblue
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#6a1b0cmaroon
#e63f1eorangered
Destructive foreground
#f6bdb1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a1a145yellowgreen
#a1a145yellowgreen

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.85:1AAA
Primary button6.87:1AA
Secondary button8.04:1AAA
Muted text7.17:1AAA
Accent8.04:1AAA
Destructive7.23:1AAA
Dark mode
Text on background18.94:1AAA
Text on card18.94:1AAA
Primary button6.87:1AA
Secondary button8.04:1AAA
Muted text9.11:1AAA
Accent8.04:1AAA
Destructive4.11:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 106.47);
  --foreground: oklch(0.133 0.02 108.834);
  --muted: oklch(0.955 0.008 286.251);
  --muted-foreground: oklch(0.428 0 180);
  --popover: oklch(0.996 0.004 106.47);
  --popover-foreground: oklch(0.133 0.02 108.834);
  --card: oklch(0.996 0.004 106.47);
  --card-foreground: oklch(0.133 0.02 108.834);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.689 0.115 109.067);
  --primary-foreground: oklch(0.178 0.02 108.249);
  --secondary: oklch(0.443 0.145 278.695);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.443 0.145 278.695);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.351 0.114 33.128);
  --destructive-foreground: oklch(0.846 0.069 31.431);
  --ring: oklch(0.689 0.115 109.067);
  --chart-1: oklch(0.689 0.115 109.067);
  --chart-2: oklch(0.443 0.145 278.695);
  --chart-3: oklch(0.443 0.145 278.695);
  --chart-4: oklch(0.463 0.153 278.618);
  --chart-5: oklch(0.699 0.121 109.159);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.151 0.021 108.668);
  --foreground: oklch(0.987 0.002 106.439);
  --muted: oklch(0.147 0.013 284.743);
  --muted-foreground: oklch(0.757 0 180);
  --popover: oklch(0.151 0.021 108.668);
  --popover-foreground: oklch(0.987 0.002 106.439);
  --card: oklch(0.151 0.021 108.668);
  --card-foreground: oklch(0.987 0.002 106.439);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.689 0.115 109.067);
  --primary-foreground: oklch(0.178 0.02 108.249);
  --secondary: oklch(0.443 0.145 278.695);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.443 0.145 278.695);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.614 0.208 32.965);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.689 0.115 109.067);
  --chart-1: oklch(0.689 0.115 109.067);
  --chart-2: oklch(0.443 0.145 278.695);
  --chart-3: oklch(0.443 0.145 278.695);
  --chart-4: oklch(0.463 0.153 278.618);
  --chart-5: oklch(0.699 0.121 109.159);
}