Caring for shadcn/ui

Caring is a shadcn/ui theme built around a vivid red primary color (#cf130c) with vivid orange accents (#cf740c). The light mode uses a neutral background (#fefbfb). Dark mode keeps the vivid red primary (#cf130c) on a red-tinted background (#0b0505).

Color palette

TokenLightDark
Background
#fefbfbsnow
#0b0505black
Foreground
#040101black
#fdfcfcsnow
Card
#fefbfbsnow
#0b0505black
Card foreground
#040101black
#fdfcfcsnow
Popover
#fefbfbsnow
#0b0505black
Popover foreground
#040101black
#fdfcfcsnow
Primary
#cf130cfirebrick
#cf130cfirebrick
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cf0c67mediumvioletred
#cf0c67mediumvioletred
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e7cfdagainsboro
#301823black
Muted foreground
#676566dimgray
#9a9899darkgray
Accent
#cf740cchocolate
#cf740cchocolate
Accent foreground
#000000black
#000000black
Destructive
#a5270dfirebrick
#ee4f2ftomato
Destructive foreground
#fdebe7linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cf130cfirebrick
#cf130cfirebrick

Contrast

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

Light mode
Text on background20.24:1AAA
Text on card20.24:1AAA
Primary button5.59:1AA
Secondary button5.37:1AA
Muted text3.95:1AA Large
Accent6.17:1AA
Destructive6.29:1AA
Dark mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button5.59:1AA
Secondary button5.37:1AA
Muted text5.74:1AA
Accent6.17:1AA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 19.637);
  --foreground: oklch(0.083 0.014 23.674);
  --muted: oklch(0.878 0.031 347.831);
  --muted-foreground: oklch(0.509 0.003 347.063);
  --popover: oklch(0.991 0.002 19.637);
  --popover-foreground: oklch(0.083 0.014 23.674);
  --card: oklch(0.991 0.002 19.637);
  --card-foreground: oklch(0.083 0.014 23.674);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.542 0.215 29.187);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.555 0.219 2.725);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.648 0.15 59.464);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.475 0.166 32.763);
  --destructive-foreground: oklch(0.954 0.02 31.094);
  --ring: oklch(0.542 0.215 29.187);
  --chart-1: oklch(0.542 0.215 29.187);
  --chart-2: oklch(0.555 0.219 2.725);
  --chart-3: oklch(0.648 0.15 59.464);
  --chart-4: oklch(0.583 0.231 2.862);
  --chart-5: oklch(0.548 0.219 29.264);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.013 21.889);
  --foreground: oklch(0.991 0.002 19.631);
  --muted: oklch(0.245 0.043 351.285);
  --muted-foreground: oklch(0.682 0.003 347.015);
  --popover: oklch(0.124 0.013 21.889);
  --popover-foreground: oklch(0.991 0.002 19.631);
  --card: oklch(0.124 0.013 21.889);
  --card-foreground: oklch(0.991 0.002 19.631);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.542 0.215 29.187);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.555 0.219 2.725);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.648 0.15 59.464);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.645 0.201 33.196);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.542 0.215 29.187);
  --chart-1: oklch(0.542 0.215 29.187);
  --chart-2: oklch(0.555 0.219 2.725);
  --chart-3: oklch(0.648 0.15 59.464);
  --chart-4: oklch(0.583 0.231 2.862);
  --chart-5: oklch(0.548 0.219 29.264);
}