Critical for shadcn/ui

Critical is a shadcn/ui theme built around a muted pink primary color (#b59ba8) with muted red accents (#b59c9b). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted pink primary (#b59ba8) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#0c0308black
#f9f6f7whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#0c0308black
#f9f6f7whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#0c0308black
#f9f6f7whitesmoke
Primary
#b59ba8darkgray
#b59ba8darkgray
Primary foreground
#120d0fblack
#120d0fblack
Secondary
#b59bb5darkgray
#b59bb5darkgray
Secondary foreground
#120d12black
#120d12black
Muted
#f0e0f0lavender
#1f0f1fblack
Muted foreground
#504450darkslategray
#bbafbbsilver
Accent
#b59c9brosybrown
#b59c9brosybrown
Accent foreground
#120d0dblack
#120d0dblack
Destructive
#990c05darkred
#f8352aorangered
Destructive foreground
#fed5d2bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b59ba8darkgray
#b59ba8darkgray

Contrast

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

Light mode
Text on background20.34:1AAA
Text on card20.34:1AAA
Primary button7.56:1AAA
Secondary button7.64:1AAA
Muted text7.28:1AAA
Accent7.51:1AAA
Destructive6.48:1AA
Dark mode
Text on background19.55:1AAA
Text on card19.55:1AAA
Primary button7.56:1AAA
Secondary button7.64:1AAA
Muted text8.69:1AAA
Accent7.51:1AAA
Destructive3.78:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.121 0.024 346.107);
  --muted: oklch(0.924 0.027 326.289);
  --muted-foreground: oklch(0.403 0.025 326.534);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.121 0.024 346.107);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.121 0.024 346.107);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.717 0.035 347.275);
  --primary-foreground: oklch(0.166 0.009 347.397);
  --secondary: oklch(0.722 0.047 326.563);
  --secondary-foreground: oklch(0.167 0.012 326.611);
  --accent: oklch(0.714 0.03 19.042);
  --accent-foreground: oklch(0.165 0.008 19.116);
  --destructive: oklch(0.434 0.172 29.599);
  --destructive-foreground: oklch(0.906 0.046 21.593);
  --ring: oklch(0.717 0.035 347.275);
  --chart-1: oklch(0.717 0.035 347.275);
  --chart-2: oklch(0.722 0.047 326.563);
  --chart-3: oklch(0.714 0.03 19.042);
  --chart-4: oklch(0.747 0.042 326.5);
  --chart-5: oklch(0.715 0.042 347.526);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.004 346.136);
  --muted: oklch(0.199 0.039 327.503);
  --muted-foreground: oklch(0.768 0.021 326.272);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.975 0.004 346.136);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.975 0.004 346.136);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.717 0.035 347.275);
  --primary-foreground: oklch(0.166 0.009 347.397);
  --secondary: oklch(0.722 0.047 326.563);
  --secondary-foreground: oklch(0.167 0.012 326.611);
  --accent: oklch(0.714 0.03 19.042);
  --accent-foreground: oklch(0.165 0.008 19.116);
  --destructive: oklch(0.638 0.231 28.745);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.717 0.035 347.275);
  --chart-1: oklch(0.717 0.035 347.275);
  --chart-2: oklch(0.722 0.047 326.563);
  --chart-3: oklch(0.714 0.03 19.042);
  --chart-4: oklch(0.747 0.042 326.5);
  --chart-5: oklch(0.715 0.042 347.526);
}