Medium for shadcn/ui

Medium is a shadcn/ui theme built around a neutral gray primary color (#889084) with neutral gray accents (#908488). The light mode uses a neutral background (#fcfefb). Dark mode keeps the neutral gray primary (#889084) on a green-tinted background (#090e07).

Color palette

TokenLightDark
Background
#fcfefbwhite
#090e07black
Foreground
#040802black
#ffffffwhite
Card
#f9fdf7mintcream
#0b1108black
Card foreground
#020401black
#ffffffwhite
Popover
#fcfefbwhite
#090e07black
Popover foreground
#040802black
#ffffffwhite
Primary
#889084gray
#889084gray
Primary foreground
#000000black
#000000black
Secondary
#848890lightslategray
#848890lightslategray
Secondary foreground
#000000black
#000000black
Muted
#d8dce4gainsboro
#1b1f27black
Muted foreground
#404040darkslategray
#bfbfbfsilver
Accent
#908488gray
#908488gray
Accent foreground
#000000black
#000000black
Destructive
#d11910firebrick
#ee261bcrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#889084gray
#889084gray

Contrast

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

Light mode
Text on background19.90:1AAA
Text on card20.03:1AAA
Primary button6.33:1AA
Secondary button5.88:1AA
Muted text7.52:1AAA
Accent5.82:1AA
Destructive5.45:1AA
Dark mode
Text on background19.52:1AAA
Text on card19.10:1AAA
Primary button6.33:1AA
Secondary button5.88:1AA
Muted text8.97:1AAA
Accent5.82:1AA
Destructive4.26:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.005 134.852);
  --foreground: oklch(0.126 0.024 133.033);
  --muted: oklch(0.893 0.012 264.504);
  --muted-foreground: oklch(0.371 0 168.69);
  --popover: oklch(0.995 0.005 134.852);
  --popover-foreground: oklch(0.126 0.024 133.033);
  --card: oklch(0.99 0.01 134.877);
  --card-foreground: oklch(0.1 0.019 133.033);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.642 0.019 134.979);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.625 0.013 264.477);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.624 0.015 355.281);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.548 0.214 29.389);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.642 0.019 134.979);
  --chart-1: oklch(0.642 0.019 134.979);
  --chart-2: oklch(0.625 0.013 264.477);
  --chart-3: oklch(0.624 0.015 355.281);
  --chart-4: oklch(0.651 0.012 264.487);
  --chart-5: oklch(0.648 0.031 135.07);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.017 134.43);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.239 0.017 264.169);
  --muted-foreground: oklch(0.805 0 169.695);
  --popover: oklch(0.154 0.017 134.43);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.169 0.02 135.296);
  --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.642 0.019 134.979);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.625 0.013 264.477);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.624 0.015 355.281);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.609 0.232 29.207);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.642 0.019 134.979);
  --chart-1: oklch(0.642 0.019 134.979);
  --chart-2: oklch(0.625 0.013 264.477);
  --chart-3: oklch(0.624 0.015 355.281);
  --chart-4: oklch(0.651 0.012 264.487);
  --chart-5: oklch(0.648 0.031 135.07);
}