Caring for shadcn/ui

Caring is a shadcn/ui theme built around a muted deep green primary color (#2a472e) with muted deep red accents (#472e2a). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#2a472e) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#ffffffwhite
#010402black
Foreground
#041607black
#fcfdfcwhite
Card
#fcfcfcsnow
#020803black
Card foreground
#031105black
#ffffffwhite
Popover
#ffffffwhite
#010402black
Popover foreground
#041607black
#fcfdfcwhite
Primary
#2a472edarkslategray
#2a472edarkslategray
Primary foreground
#c5ddc9lightgrey
#c5ddc9lightgrey
Secondary
#2e2a47darkslategray
#2e2a47darkslategray
Secondary foreground
#c9c5ddthistle
#c9c5ddthistle
Muted
#d9d8dfgainsboro
#222027black
Muted foreground
#57565ddimgray
#a3a2a9darkgray
Accent
#472e2adarkslategray
#472e2adarkslategray
Accent foreground
#ddc9c5lightgrey
#ddc9c5lightgrey
Destructive
#961c03darkred
#fa431eorangered
Destructive foreground
#fed5cdbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2a472edarkslategray
#2a472edarkslategray

Contrast

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

Light mode
Text on background18.70:1AAA
Text on card18.91:1AAA
Primary button7.17:1AAA
Secondary button8.16:1AAA
Muted text5.12:1AA
Accent7.80:1AAA
Destructive6.35:1AA
Dark mode
Text on background20.20:1AAA
Text on card20.22:1AAA
Primary button7.17:1AAA
Secondary button8.16:1AAA
Muted text6.34:1AA
Accent7.80:1AAA
Destructive3.56: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.178 0.04 148.223);
  --muted: oklch(0.885 0.009 293.88);
  --muted-foreground: oklch(0.456 0.012 293.59);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.178 0.04 148.223);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.161 0.035 148.839);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.366 0.055 148.518);
  --primary-foreground: oklch(0.874 0.037 150.225);
  --secondary: oklch(0.303 0.052 290.585);
  --secondary-foreground: oklch(0.835 0.033 293.315);
  --accent: oklch(0.33 0.037 31.682);
  --accent-foreground: oklch(0.852 0.023 31.115);
  --destructive: oklch(0.437 0.161 32.485);
  --destructive-foreground: oklch(0.906 0.047 31.236);
  --ring: oklch(0.366 0.055 148.518);
  --chart-1: oklch(0.366 0.055 148.518);
  --chart-2: oklch(0.303 0.052 290.585);
  --chart-3: oklch(0.33 0.037 31.682);
  --chart-4: oklch(0.328 0.058 290.478);
  --chart-5: oklch(0.37 0.06 148.261);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.016 149.861);
  --foreground: oklch(0.993 0.001 150.809);
  --muted: oklch(0.249 0.012 293.147);
  --muted-foreground: oklch(0.716 0.01 293.797);
  --popover: oklch(0.097 0.016 149.861);
  --popover-foreground: oklch(0.993 0.001 150.809);
  --card: oklch(0.122 0.02 149.861);
  --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.366 0.055 148.518);
  --primary-foreground: oklch(0.874 0.037 150.225);
  --secondary: oklch(0.303 0.052 290.585);
  --secondary-foreground: oklch(0.835 0.033 293.315);
  --accent: oklch(0.33 0.037 31.682);
  --accent-foreground: oklch(0.852 0.023 31.115);
  --destructive: oklch(0.651 0.225 32.871);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.366 0.055 148.518);
  --chart-1: oklch(0.366 0.055 148.518);
  --chart-2: oklch(0.303 0.052 290.585);
  --chart-3: oklch(0.33 0.037 31.682);
  --chart-4: oklch(0.328 0.058 290.478);
  --chart-5: oklch(0.37 0.06 148.261);
}