Metro for shadcn/ui

Metro is a shadcn/ui theme built around a deep pink primary color (#48192e) with deep teal accents (#194833). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep pink primary (#48192e) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#fdfbfcsnow
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#000000black
#fdfbfcsnow
Primary
#48192edarkslategray
#48192edarkslategray
Primary foreground
#e4afc7thistle
#e4afc7thistle
Secondary
#194833darkslategray
#194833darkslategray
Secondary foreground
#afe4ccpowderblue
#afe4ccpowderblue
Muted
#eff1f0whitesmoke
#0e100fblack
Muted foreground
#394740darkslategray
#b8c6c0silver
Accent
#194833darkslategray
#194833darkslategray
Accent foreground
#afe4ccpowderblue
#afe4ccpowderblue
Destructive
#791406maroon
#e9260corangered
Destructive foreground
#fbbeb6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#48192edarkslategray
#48192edarkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.74:1AAA
Secondary button7.32:1AAA
Muted text8.59:1AAA
Accent7.32:1AAA
Destructive6.85:1AA
Dark mode
Text on background20.38:1AAA
Text on card20.67:1AAA
Primary button7.74:1AAA
Secondary button7.32:1AAA
Muted text10.77:1AAA
Accent7.32:1AAA
Destructive4.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.956 0.003 167.737);
  --muted-foreground: oklch(0.383 0.021 166.202);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.293 0.077 354.851);
  --primary-foreground: oklch(0.809 0.068 349.997);
  --secondary: oklch(0.363 0.064 161.087);
  --secondary-foreground: oklch(0.875 0.063 165.638);
  --accent: oklch(0.363 0.064 161.087);
  --accent-foreground: oklch(0.875 0.063 165.638);
  --destructive: oklch(0.374 0.137 31.113);
  --destructive-foreground: oklch(0.856 0.071 27.222);
  --ring: oklch(0.293 0.077 354.851);
  --chart-1: oklch(0.293 0.077 354.851);
  --chart-2: oklch(0.363 0.064 161.087);
  --chart-3: oklch(0.363 0.064 161.087);
  --chart-4: oklch(0.4 0.072 160.881);
  --chart-5: oklch(0.293 0.081 355.318);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 347.879);
  --muted: oklch(0.172 0.004 167.16);
  --muted-foreground: oklch(0.815 0.018 167.202);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.002 347.879);
  --card: oklch(0.092 0 180);
  --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.293 0.077 354.851);
  --primary-foreground: oklch(0.809 0.068 349.997);
  --secondary: oklch(0.363 0.064 161.087);
  --secondary-foreground: oklch(0.875 0.063 165.638);
  --accent: oklch(0.363 0.064 161.087);
  --accent-foreground: oklch(0.875 0.063 165.638);
  --destructive: oklch(0.598 0.228 30.821);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.293 0.077 354.851);
  --chart-1: oklch(0.293 0.077 354.851);
  --chart-2: oklch(0.363 0.064 161.087);
  --chart-3: oklch(0.363 0.064 161.087);
  --chart-4: oklch(0.4 0.072 160.881);
  --chart-5: oklch(0.293 0.081 355.318);
}