Critical for shadcn/ui

Critical is a shadcn/ui theme built around a light blue primary color (#a5aeee) with light green accents (#aeeea5). The light mode uses a neutral background (#ffffff). Dark mode keeps the light blue primary (#a5aeee) on a neutral background (#030308).

Color palette

TokenLightDark
Background
#ffffffwhite
#030308black
Foreground
#02030eblack
#f6f7f8whitesmoke
Card
#ffffffwhite
#030308black
Card foreground
#02030eblack
#f6f7f8whitesmoke
Popover
#ffffffwhite
#030308black
Popover foreground
#02030eblack
#f6f7f8whitesmoke
Primary
#a5aeeelightsteelblue
#a5aeeelightsteelblue
Primary foreground
#0f1852midnightblue
#0f1852midnightblue
Secondary
#eea5aelightpink
#eea5aelightpink
Secondary foreground
#520f18maroon
#520f18maroon
Muted
#f3e3e5mistyrose
#1c0c0fblack
Muted foreground
#574c4ddarkslategray
#b3a8a9darkgray
Accent
#aeeea5palegreen
#aeeea5palegreen
Accent foreground
#18520fdarkgreen
#18520fdarkgreen
Destructive
#be2d09firebrick
#f54e24orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a5aeeelightsteelblue
#a5aeeelightsteelblue

Contrast

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

Light mode
Text on background20.54:1AAA
Text on card20.54:1AAA
Primary button7.78:1AAA
Secondary button7.36:1AAA
Muted text6.62:1AA
Accent6.93:1AA
Destructive5.88:1AA
Dark mode
Text on background19.17:1AAA
Text on card19.17:1AAA
Primary button7.78:1AAA
Secondary button7.36:1AAA
Muted text8.17:1AAA
Accent6.93:1AA
Destructive3.51: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.106 0.03 268.888);
  --muted: oklch(0.928 0.018 8.211);
  --muted-foreground: oklch(0.428 0.015 8.628);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.106 0.03 268.888);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.106 0.03 268.888);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.768 0.092 277.236);
  --primary-foreground: oklch(0.246 0.105 269.798);
  --secondary: oklch(0.794 0.088 10.483);
  --secondary-foreground: oklch(0.292 0.097 18.603);
  --accent: oklch(0.889 0.118 141.23);
  --accent-foreground: oklch(0.386 0.114 141.241);
  --destructive: oklch(0.526 0.186 33.587);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.768 0.092 277.236);
  --chart-1: oklch(0.768 0.092 277.236);
  --chart-2: oklch(0.794 0.088 10.483);
  --chart-3: oklch(0.889 0.118 141.23);
  --chart-4: oklch(0.823 0.075 9.963);
  --chart-5: oklch(0.765 0.097 277.12);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.015 274.101);
  --foreground: oklch(0.975 0.002 279.305);
  --muted: oklch(0.181 0.028 11.601);
  --muted-foreground: oklch(0.741 0.013 8.189);
  --popover: oklch(0.102 0.015 274.101);
  --popover-foreground: oklch(0.975 0.002 279.305);
  --card: oklch(0.102 0.015 274.101);
  --card-foreground: oklch(0.975 0.002 279.305);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.768 0.092 277.236);
  --primary-foreground: oklch(0.246 0.105 269.798);
  --secondary: oklch(0.794 0.088 10.483);
  --secondary-foreground: oklch(0.292 0.097 18.603);
  --accent: oklch(0.889 0.118 141.23);
  --accent-foreground: oklch(0.386 0.114 141.241);
  --destructive: oklch(0.653 0.21 34.6);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.768 0.092 277.236);
  --chart-1: oklch(0.768 0.092 277.236);
  --chart-2: oklch(0.794 0.088 10.483);
  --chart-3: oklch(0.889 0.118 141.23);
  --chart-4: oklch(0.823 0.075 9.963);
  --chart-5: oklch(0.765 0.097 277.12);
}