Medical for shadcn/ui

Medical is a shadcn/ui theme built around a green primary color (#59b027) with violet accents (#7d27b0). The light mode uses a neutral background (#f9fcf7). Dark mode keeps the green primary (#59b027) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f9fcf7mintcream
#000000black
Foreground
#000000black
#fafbf8snow
Card
#f9fcf7mintcream
#000000black
Card foreground
#000000black
#fafbf8snow
Popover
#f9fcf7mintcream
#000000black
Popover foreground
#000000black
#fafbf8snow
Primary
#59b027olivedrab
#59b027olivedrab
Primary foreground
#040802black
#040802black
Secondary
#7d27b0rebeccapurple
#7d27b0rebeccapurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ebe9eclavender
#151316black
Muted foreground
#473d4cdarkslategray
#bcb3c2silver
Accent
#7d27b0rebeccapurple
#7d27b0rebeccapurple
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7a2101maroon
#fe571borangered
Destructive foreground
#ffc3aelightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#59b027olivedrab
#59b027olivedrab

Contrast

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

Light mode
Text on background20.36:1AAA
Text on card20.36:1AAA
Primary button7.33:1AAA
Secondary button7.53:1AAA
Muted text8.53:1AAA
Accent7.53:1AAA
Destructive6.69:1AA
Dark mode
Text on background20.21:1AAA
Text on card20.21:1AAA
Primary button7.33:1AAA
Secondary button7.53:1AAA
Muted text9.13:1AAA
Accent7.53:1AAA
Destructive6.59:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.008 133.653);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.936 0.005 313.574);
  --muted-foreground: oklch(0.377 0.028 313.145);
  --popover: oklch(0.989 0.008 133.653);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.989 0.008 133.653);
  --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.676 0.187 136.881);
  --primary-foreground: oklch(0.127 0.023 131.887);
  --secondary: oklch(0.473 0.205 309.247);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.473 0.205 309.247);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.388 0.128 37.243);
  --destructive-foreground: oklch(0.866 0.074 40.886);
  --ring: oklch(0.676 0.187 136.881);
  --chart-1: oklch(0.676 0.187 136.881);
  --chart-2: oklch(0.473 0.205 309.247);
  --chart-3: oklch(0.473 0.205 309.247);
  --chart-4: oklch(0.497 0.216 309.193);
  --chart-5: oklch(0.684 0.193 137.067);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.987 0.004 133.632);
  --muted: oklch(0.19 0.007 313.371);
  --muted-foreground: oklch(0.778 0.024 313.419);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.987 0.004 133.632);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.987 0.004 133.632);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.676 0.187 136.881);
  --primary-foreground: oklch(0.127 0.023 131.887);
  --secondary: oklch(0.473 0.205 309.247);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.473 0.205 309.247);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.677 0.212 37.58);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.676 0.187 136.881);
  --chart-1: oklch(0.676 0.187 136.881);
  --chart-2: oklch(0.473 0.205 309.247);
  --chart-3: oklch(0.473 0.205 309.247);
  --chart-4: oklch(0.497 0.216 309.193);
  --chart-5: oklch(0.684 0.193 137.067);
}