Media for shadcn/ui

Media is a shadcn/ui theme built around a pink primary color (#852e4f) with teal accents (#2e8563). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the pink primary (#852e4f) on a pink-tinted background (#0a0507).

Color palette

TokenLightDark
Background
#fdfcfcsnow
#0a0507black
Foreground
#080204black
#fbf8fasnow
Card
#fcf8fasnow
#0d0709black
Card foreground
#040102black
#fdfcfcsnow
Popover
#fcf8fasnow
#0d0709black
Popover foreground
#040102black
#fdfcfcsnow
Primary
#852e4fbrown
#852e4fbrown
Primary foreground
#f8ecf1lavenderblush
#f8ecf1lavenderblush
Secondary
#2e8563seagreen
#2e8563seagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d5e2ddgainsboro
#1d2a25darkslategray
Muted foreground
#414443darkslategray
#bbbebdsilver
Accent
#2e8563seagreen
#2e8563seagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#871903darkred
#fa431eorangered
Destructive foreground
#fec9bepink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#852e4fbrown
#852e4fbrown

Contrast

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

Light mode
Text on background20.05:1AAA
Text on card19.75:1AAA
Primary button7.32:1AAA
Secondary button4.51:1AA
Muted text7.38:1AAA
Accent4.51:1AA
Destructive6.60:1AA
Dark mode
Text on background19.15:1AAA
Text on card19.48:1AAA
Primary button7.32:1AAA
Secondary button4.51:1AA
Muted text7.91:1AAA
Accent4.51:1AA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 351.647);
  --foreground: oklch(0.104 0.023 351.139);
  --muted: oklch(0.901 0.016 171.068);
  --muted-foreground: oklch(0.382 0.004 171.294);
  --popover: oklch(0.983 0.004 351.703);
  --popover-foreground: oklch(0.083 0.018 351.139);
  --card: oklch(0.983 0.004 351.703);
  --card-foreground: oklch(0.083 0.018 351.139);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.437 0.124 359.895);
  --primary-foreground: oklch(0.954 0.015 352.032);
  --secondary: oklch(0.555 0.099 164.123);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.555 0.099 164.123);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.405 0.148 32.677);
  --destructive-foreground: oklch(0.879 0.063 31.356);
  --ring: oklch(0.437 0.124 359.895);
  --chart-1: oklch(0.437 0.124 359.895);
  --chart-2: oklch(0.555 0.099 164.123);
  --chart-3: oklch(0.555 0.099 164.123);
  --chart-4: oklch(0.589 0.105 164.044);
  --chart-5: oklch(0.438 0.13 0.477);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.011 351.405);
  --foreground: oklch(0.983 0.003 351.689);
  --muted: oklch(0.273 0.021 169.149);
  --muted-foreground: oklch(0.799 0.003 171.473);
  --popover: oklch(0.14 0.013 352.485);
  --popover-foreground: oklch(0.992 0.002 351.64);
  --card: oklch(0.14 0.013 352.485);
  --card-foreground: oklch(0.992 0.002 351.64);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.437 0.124 359.895);
  --primary-foreground: oklch(0.954 0.015 352.032);
  --secondary: oklch(0.555 0.099 164.123);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.555 0.099 164.123);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.651 0.225 32.871);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.437 0.124 359.895);
  --chart-1: oklch(0.437 0.124 359.895);
  --chart-2: oklch(0.555 0.099 164.123);
  --chart-3: oklch(0.555 0.099 164.123);
  --chart-4: oklch(0.589 0.105 164.044);
  --chart-5: oklch(0.438 0.13 0.477);
}