Caution for shadcn/ui

Caution is a shadcn/ui theme built around a neutral gray primary color (#292929) with neutral gray accents (#292929). The light mode uses a neutral background (#fefbfb). Dark mode keeps the neutral gray primary (#292929) on a neutral background (#080303).

Color palette

TokenLightDark
Background
#fefbfbsnow
#080303black
Foreground
#080202black
#ffffffwhite
Card
#fcf7f7snow
#0b0404black
Card foreground
#040101black
#ffffffwhite
Popover
#fcf7f7snow
#0b0404black
Popover foreground
#040101black
#ffffffwhite
Primary
#292929darkslategray
#292929darkslategray
Primary foreground
#c2c2c2silver
#c2c2c2silver
Secondary
#292929darkslategray
#292929darkslategray
Secondary foreground
#c2c2c2silver
#c2c2c2silver
Muted
#e2d0d0lightgrey
#2f1d1dblack
Muted foreground
#685050dimgray
#af9797rosybrown
Accent
#292929darkslategray
#292929darkslategray
Accent foreground
#c2c2c2silver
#c2c2c2silver
Destructive
#611e0amaroon
#ea5a2echocolate
Destructive foreground
#f6b9a7lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#292929darkslategray
#292929darkslategray

Contrast

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

Light mode
Text on background20.02:1AAA
Text on card19.66:1AAA
Primary button8.18:1AAA
Secondary button8.18:1AAA
Muted text4.96:1AA
Accent8.18:1AAA
Destructive7.28:1AAA
Dark mode
Text on background20.53:1AAA
Text on card20.31:1AAA
Primary button8.18:1AAA
Secondary button8.18:1AAA
Muted text5.83:1AA
Accent8.18:1AAA
Destructive6.01:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 17.202);
  --foreground: oklch(0.104 0.018 20.688);
  --muted: oklch(0.872 0.02 17.535);
  --muted-foreground: oklch(0.456 0.032 18.402);
  --popover: oklch(0.981 0.005 17.246);
  --popover-foreground: oklch(0.082 0.014 20.688);
  --card: oklch(0.981 0.005 17.246);
  --card-foreground: oklch(0.082 0.014 20.688);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.28 0 180);
  --primary-foreground: oklch(0.813 0 165.964);
  --secondary: oklch(0.28 0 180);
  --secondary-foreground: oklch(0.813 0 165.964);
  --accent: oklch(0.28 0 180);
  --accent-foreground: oklch(0.813 0 165.964);
  --destructive: oklch(0.339 0.102 36.614);
  --destructive-foreground: oklch(0.838 0.076 37.606);
  --ring: oklch(0.28 0 180);
  --chart-1: oklch(0.28 0 180);
  --chart-2: oklch(0.28 0 180);
  --chart-3: oklch(0.28 0 180);
  --chart-4: oklch(0.311 0 180);
  --chart-5: oklch(0.278 0.004 17.374);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.106 0.015 19.87);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.255 0.028 19.162);
  --muted-foreground: oklch(0.699 0.028 17.854);
  --popover: oklch(0.121 0.017 19.883);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.121 0.017 19.883);
  --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.28 0 180);
  --primary-foreground: oklch(0.813 0 165.964);
  --secondary: oklch(0.28 0 180);
  --secondary-foreground: oklch(0.813 0 165.964);
  --accent: oklch(0.28 0 180);
  --accent-foreground: oklch(0.813 0 165.964);
  --destructive: oklch(0.651 0.188 36.926);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.28 0 180);
  --chart-1: oklch(0.28 0 180);
  --chart-2: oklch(0.28 0 180);
  --chart-3: oklch(0.28 0 180);
  --chart-4: oklch(0.311 0 180);
  --chart-5: oklch(0.278 0.004 17.374);
}