Median for shadcn/ui

Median is a shadcn/ui theme built around a muted cyan primary color (#8a989e) with muted blue accents (#8a8e9e). The light mode uses a neutral background (#f8fbfc). Dark mode keeps the muted cyan primary (#8a989e) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8fbfcghostwhite
#000000black
Foreground
#010305black
#f8fbfcghostwhite
Card
#f5f8fawhitesmoke
#030303black
Card foreground
#000000black
#fcfdfdwhite
Popover
#f5f8fawhitesmoke
#030303black
Popover foreground
#000000black
#fcfdfdwhite
Primary
#8a989elightslategray
#8a989elightslategray
Primary foreground
#000000black
#000000black
Secondary
#8a9e9alightslategray
#8a9e9alightslategray
Secondary foreground
#000000black
#000000black
Muted
#e3eeeblavender
#111c1ablack
Muted foreground
#485b57darkslategray
#a4b7b3darkgray
Accent
#8a8e9elightslategray
#8a8e9elightslategray
Accent foreground
#000000black
#000000black
Destructive
#b84514sienna
#e8642cchocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8a989elightslategray
#8a989elightslategray

Contrast

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

Light mode
Text on background19.82:1AAA
Text on card19.73:1AAA
Primary button7.05:1AAA
Secondary button7.40:1AAA
Muted text6.06:1AA
Accent6.45:1AA
Destructive5.38:1AA
Dark mode
Text on background20.19:1AAA
Text on card20.29:1AAA
Primary button7.05:1AAA
Secondary button7.40:1AAA
Muted text8.26:1AAA
Accent6.45:1AA
Destructive6.28:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.003 225.017);
  --foreground: oklch(0.094 0.013 217.609);
  --muted: oklch(0.939 0.012 182.831);
  --muted-foreground: oklch(0.455 0.025 181.613);
  --popover: oklch(0.978 0.005 225.035);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.978 0.005 225.035);
  --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.67 0.018 225.308);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.681 0.023 182.258);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.649 0.023 274.566);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.542 0.158 40.163);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.67 0.018 225.308);
  --chart-1: oklch(0.67 0.018 225.308);
  --chart-2: oklch(0.681 0.023 182.258);
  --chart-3: oklch(0.649 0.023 274.566);
  --chart-4: oklch(0.705 0.021 182.361);
  --chart-5: oklch(0.671 0.023 225.433);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.985 0.003 225.014);
  --muted: oklch(0.217 0.016 180.931);
  --muted-foreground: oklch(0.764 0.022 182.369);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.993 0.001 224.998);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.993 0.001 224.998);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.67 0.018 225.308);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.681 0.023 182.258);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.649 0.023 274.566);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.66 0.177 41.377);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.67 0.018 225.308);
  --chart-1: oklch(0.67 0.018 225.308);
  --chart-2: oklch(0.681 0.023 182.258);
  --chart-3: oklch(0.649 0.023 274.566);
  --chart-4: oklch(0.705 0.021 182.361);
  --chart-5: oklch(0.671 0.023 225.433);
}