Diagnosis for shadcn/ui

Diagnosis is a shadcn/ui theme built around a neutral gray primary color (#b1adb3) with neutral gray accents (#adb3b1). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the neutral gray primary (#b1adb3) on a violet-tinted background (#0c070d).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#0c070dblack
Foreground
#030105black
#faf9fbghostwhite
Card
#fdfbfdsnow
#0c070dblack
Card foreground
#030105black
#faf9fbghostwhite
Popover
#fdfbfdsnow
#0c070dblack
Popover foreground
#030105black
#faf9fbghostwhite
Primary
#b1adb3darkgray
#b1adb3darkgray
Primary foreground
#171618black
#171618black
Secondary
#b3b1addarkgray
#b3b1addarkgray
Secondary foreground
#181716black
#181716black
Muted
#e7e5degainsboro
#211e18black
Muted foreground
#41403edarkslategray
#c1c0besilver
Accent
#adb3b1darkgray
#adb3b1darkgray
Accent foreground
#161817black
#161817black
Destructive
#b21810firebrick
#ee433atomato
Destructive foreground
#fef6f6snow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b1adb3darkgray
#b1adb3darkgray

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 button8.15:1AAA
Secondary button8.38:1AAA
Muted text8.22:1AAA
Accent8.38:1AAA
Destructive6.50:1AA
Dark mode
Text on background19.02:1AAA
Text on card19.02:1AAA
Primary button8.15:1AAA
Secondary button8.38:1AAA
Muted text9.15:1AAA
Accent8.38:1AAA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 316.6);
  --foreground: oklch(0.08 0.026 319.384);
  --muted: oklch(0.922 0.009 88.853);
  --muted-foreground: oklch(0.373 0.003 88.846);
  --popover: oklch(0.991 0.003 316.6);
  --popover-foreground: oklch(0.08 0.026 319.384);
  --card: oklch(0.991 0.003 316.6);
  --card-foreground: oklch(0.08 0.026 319.384);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.753 0.01 316.569);
  --primary-foreground: oklch(0.203 0.004 316.549);
  --secondary: oklch(0.762 0.007 88.847);
  --secondary-foreground: oklch(0.206 0.003 88.872);
  --accent: oklch(0.762 0.008 177.426);
  --accent-foreground: oklch(0.206 0.003 177.285);
  --destructive: oklch(0.489 0.188 29.28);
  --destructive-foreground: oklch(0.979 0.009 21.003);
  --ring: oklch(0.753 0.01 316.569);
  --chart-1: oklch(0.753 0.01 316.569);
  --chart-2: oklch(0.762 0.007 88.847);
  --chart-3: oklch(0.762 0.008 177.426);
  --chart-4: oklch(0.785 0.006 88.84);
  --chart-5: oklch(0.749 0.018 316.539);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.016 316.764);
  --foreground: oklch(0.984 0.003 316.601);
  --muted: oklch(0.236 0.012 89.012);
  --muted-foreground: oklch(0.807 0.003 88.813);
  --popover: oklch(0.139 0.016 316.764);
  --popover-foreground: oklch(0.984 0.003 316.601);
  --card: oklch(0.139 0.016 316.764);
  --card-foreground: oklch(0.984 0.003 316.601);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.753 0.01 316.569);
  --primary-foreground: oklch(0.203 0.004 316.549);
  --secondary: oklch(0.762 0.007 88.847);
  --secondary-foreground: oklch(0.206 0.003 88.872);
  --accent: oklch(0.762 0.008 177.426);
  --accent-foreground: oklch(0.206 0.003 177.285);
  --destructive: oklch(0.633 0.209 27.831);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.753 0.01 316.569);
  --chart-1: oklch(0.753 0.01 316.569);
  --chart-2: oklch(0.762 0.007 88.847);
  --chart-3: oklch(0.762 0.008 177.426);
  --chart-4: oklch(0.785 0.006 88.84);
  --chart-5: oklch(0.749 0.018 316.539);
}