Caring for shadcn/ui

Caring is a shadcn/ui theme built around a muted green primary color (#829785) with muted light green accents (#d4e2d6). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#829785) on a green-tinted background (#070e08).

Color palette

TokenLightDark
Background
#ffffffwhite
#070e08black
Foreground
#020d04black
#f6f8f7whitesmoke
Card
#ffffffwhite
#070e08black
Card foreground
#020d04black
#f6f8f7whitesmoke
Popover
#ffffffwhite
#070e08black
Popover foreground
#020d04black
#f6f8f7whitesmoke
Primary
#829785gray
#829785gray
Primary foreground
#000000black
#000000black
Secondary
#d4e2d6gainsboro
#18251ablack
Secondary foreground
#355039darkslategray
#a9c6aedarkgray
Muted
#d1ead5gainsboro
#152e18black
Muted foreground
#59695bdimgray
#96a699darkgray
Accent
#d4e2d6gainsboro
#18251ablack
Accent foreground
#355039darkslategray
#a9c6aedarkgray
Destructive
#99190bdarkred
#f03c28orangered
Destructive foreground
#fcdcd9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#829785gray
#829785gray

Contrast

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

Light mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button6.68:1AA
Secondary button6.66:1AA
Muted text4.58:1AA
Accent6.66:1AA
Destructive6.58:1AA
Dark mode
Text on background18.34:1AAA
Text on card18.34:1AAA
Primary button6.68:1AA
Secondary button8.64:1AAA
Muted text5.73:1AA
Accent8.64:1AAA
Destructive3.89:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.143 0.03 148.795);
  --muted: oklch(0.914 0.039 149.674);
  --muted-foreground: oklch(0.502 0.028 149.496);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.143 0.03 148.795);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.143 0.03 148.795);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.654 0.035 149.528);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.9 0.022 149.919);
  --secondary-foreground: oklch(0.401 0.05 148.481);
  --accent: oklch(0.9 0.022 149.919);
  --accent-foreground: oklch(0.401 0.05 148.481);
  --destructive: oklch(0.44 0.164 30.519);
  --destructive-foreground: oklch(0.921 0.036 25.354);
  --ring: oklch(0.654 0.035 149.528);
  --chart-1: oklch(0.654 0.035 149.528);
  --chart-2: oklch(0.9 0.022 149.919);
  --chart-3: oklch(0.9 0.022 149.919);
  --chart-4: oklch(0.922 0.017 149.997);
  --chart-5: oklch(0.658 0.046 149.288);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.152 0.018 149.257);
  --foreground: oklch(0.978 0.003 150.206);
  --muted: oklch(0.273 0.05 147.438);
  --muted-foreground: oklch(0.709 0.026 149.764);
  --popover: oklch(0.152 0.018 149.257);
  --popover-foreground: oklch(0.978 0.003 150.206);
  --card: oklch(0.152 0.018 149.257);
  --card-foreground: oklch(0.978 0.003 150.206);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.654 0.035 149.528);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.248 0.026 148.776);
  --secondary-foreground: oklch(0.798 0.046 149.471);
  --accent: oklch(0.248 0.026 148.776);
  --accent-foreground: oklch(0.798 0.046 149.471);
  --destructive: oklch(0.629 0.218 30.37);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.654 0.035 149.528);
  --chart-1: oklch(0.654 0.035 149.528);
  --chart-2: oklch(0.248 0.026 148.776);
  --chart-3: oklch(0.248 0.026 148.776);
  --chart-4: oklch(0.283 0.031 148.678);
  --chart-5: oklch(0.658 0.046 149.288);
}