Critical for shadcn/ui

Critical is a shadcn/ui theme built around a blue primary color (#98a2e1) with green accents (#a2e198). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the blue primary (#98a2e1) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#030407black
Foreground
#000000black
#f5f5fawhitesmoke
Card
#f7f8fdghostwhite
#05060ablack
Card foreground
#000000black
#f8f9fcghostwhite
Popover
#fbfbfeghostwhite
#030407black
Popover foreground
#000000black
#f5f5fawhitesmoke
Primary
#98a2e1lightsteelblue
#98a2e1lightsteelblue
Primary foreground
#101537midnightblue
#101537midnightblue
Secondary
#e198a2tan
#e198a2tan
Secondary foreground
#371015black
#371015black
Muted
#e7dadcgainsboro
#25181ablack
Muted foreground
#5e4549darkolivegreen
#baa1a4darkgray
Accent
#a2e198lightgreen
#a2e198lightgreen
Accent foreground
#153710darkgreen
#153710darkgreen
Destructive
#bc2615firebrick
#ea5443tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#98a2e1lightsteelblue
#98a2e1lightsteelblue

Contrast

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

Light mode
Text on background20.37:1AAA
Text on card19.76:1AAA
Primary button7.25:1AAA
Secondary button7.40:1AAA
Muted text6.38:1AA
Accent8.68:1AAA
Destructive6.12:1AA
Dark mode
Text on background18.88:1AAA
Text on card19.27:1AAA
Primary button7.25:1AAA
Secondary button7.40:1AAA
Muted text7.10:1AAA
Accent8.68:1AAA
Destructive3.59:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 279.29);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.899 0.014 8.118);
  --muted-foreground: oklch(0.419 0.034 9.726);
  --popover: oklch(0.99 0.003 279.29);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.007 279.237);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.728 0.092 277.105);
  --primary-foreground: oklch(0.215 0.066 272.979);
  --secondary: oklch(0.755 0.088 10.635);
  --secondary-foreground: oklch(0.24 0.063 15.153);
  --accent: oklch(0.849 0.118 141.216);
  --accent-foreground: oklch(0.302 0.076 141.093);
  --destructive: oklch(0.517 0.188 30.504);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.728 0.092 277.105);
  --chart-1: oklch(0.728 0.092 277.105);
  --chart-2: oklch(0.755 0.088 10.635);
  --chart-3: oklch(0.849 0.118 141.216);
  --chart-4: oklch(0.783 0.077 10.161);
  --chart-5: oklch(0.725 0.098 276.95);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.106 0.011 275.711);
  --foreground: oklch(0.972 0.006 279.247);
  --muted: oklch(0.227 0.02 9.881);
  --muted-foreground: oklch(0.732 0.029 8.714);
  --popover: oklch(0.106 0.011 275.711);
  --popover-foreground: oklch(0.972 0.006 279.247);
  --card: oklch(0.121 0.013 275.715);
  --card-foreground: oklch(0.982 0.004 279.279);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.728 0.092 277.105);
  --primary-foreground: oklch(0.215 0.066 272.979);
  --secondary: oklch(0.755 0.088 10.635);
  --secondary-foreground: oklch(0.24 0.063 15.153);
  --accent: oklch(0.849 0.118 141.216);
  --accent-foreground: oklch(0.302 0.076 141.093);
  --destructive: oklch(0.645 0.189 29.514);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.728 0.092 277.105);
  --chart-1: oklch(0.728 0.092 277.105);
  --chart-2: oklch(0.755 0.088 10.635);
  --chart-3: oklch(0.849 0.118 141.216);
  --chart-4: oklch(0.783 0.077 10.161);
  --chart-5: oklch(0.725 0.098 276.95);
}