Medical for shadcn/ui

Medical is a shadcn/ui theme built around a purple primary color (#c374c2) with muted purple accents (#c7aec6). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the purple primary (#c374c2) on a purple-tinted background (#0c040c).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#0c040cblack
Foreground
#0c030cblack
#ffffffwhite
Card
#fcf8fcsnow
#100510black
Card foreground
#080208black
#ffffffwhite
Popover
#fdfcfdwhite
#0c040cblack
Popover foreground
#0c030cblack
#ffffffwhite
Primary
#c374c2orchid
#c374c2orchid
Primary foreground
#040204black
#040204black
Secondary
#d8d0d7lightgrey
#251d25black
Secondary foreground
#403540darkslategray
#c3b1c3silver
Muted
#f2eef1whitesmoke
#110d11black
Muted foreground
#545454dimgray
#abababdarkgray
Accent
#c7aec6silver
#3d293ddarkslategray
Accent foreground
#271b27black
#d6c2d6thistle
Destructive
#c82d0efirebrick
#ee3611orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c374c2orchid
#c374c2orchid

Contrast

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

Light mode
Text on background19.80:1AAA
Text on card19.52:1AAA
Primary button6.49:1AA
Secondary button7.71:1AAA
Muted text6.58:1AA
Accent8.07:1AAA
Destructive5.46:1AA
Dark mode
Text on background20.27:1AAA
Text on card20.01:1AAA
Primary button6.49:1AA
Secondary button8.11:1AAA
Muted text8.37:1AAA
Accent7.93:1AAA
Destructive4.05:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 326.078);
  --foreground: oklch(0.124 0.03 327.676);
  --muted: oklch(0.953 0.006 326.106);
  --muted-foreground: oklch(0.446 0 180);
  --popover: oklch(0.992 0.003 326.078);
  --popover-foreground: oklch(0.124 0.03 327.676);
  --card: oklch(0.983 0.006 326.103);
  --card-foreground: oklch(0.108 0.026 327.623);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.672 0.142 327.601);
  --primary-foreground: oklch(0.088 0.014 327.138);
  --secondary: oklch(0.865 0.013 326.179);
  --secondary-foreground: oklch(0.346 0.023 326.572);
  --accent: oklch(0.779 0.044 326.497);
  --accent-foreground: oklch(0.243 0.028 326.939);
  --destructive: oklch(0.545 0.195 32.549);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.672 0.142 327.601);
  --chart-1: oklch(0.672 0.142 327.601);
  --chart-2: oklch(0.865 0.013 326.179);
  --chart-3: oklch(0.779 0.044 326.497);
  --chart-4: oklch(0.889 0.011 326.153);
  --chart-5: oklch(0.672 0.152 327.698);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.028 327.561);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.168 0.01 326.502);
  --muted-foreground: oklch(0.741 0 171.254);
  --popover: oklch(0.125 0.028 327.561);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.032 327.672);
  --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.672 0.142 327.601);
  --primary-foreground: oklch(0.088 0.014 327.138);
  --secondary: oklch(0.244 0.02 326.702);
  --secondary-foreground: oklch(0.782 0.032 326.375);
  --accent: oklch(0.313 0.045 327.136);
  --accent-foreground: oklch(0.836 0.035 326.39);
  --destructive: oklch(0.619 0.224 32.449);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.672 0.142 327.601);
  --chart-1: oklch(0.672 0.142 327.601);
  --chart-2: oklch(0.244 0.02 326.702);
  --chart-3: oklch(0.313 0.045 327.136);
  --chart-4: oklch(0.275 0.024 326.739);
  --chart-5: oklch(0.672 0.152 327.698);
}