Secure Mandarin Red for shadcn/ui

Secure Mandarin Red is a shadcn/ui theme built around a vivid red primary color (#e74d3c) with muted blue accents (#404c59). The light mode uses a blue-tinted background (#20262c). Dark mode keeps the vivid red primary (#e74d3c) on a blue-tinted background (#20262c).

Color palette

TokenLightDark
Background
#20262cdarkslategray
#20262cdarkslategray
Foreground
#f8f8f1whitesmoke
#f8f8f1whitesmoke
Card
#1c2126black
#1c2126black
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#1a1e23black
#1a1e23black
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#e74d3ctomato
#e74d3ctomato
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d2b0acsilver
#d2b0acsilver
Secondary foreground
#321d1bblack
#321d1bblack
Muted
#2b3036darkslategray
#2b3036darkslategray
Muted foreground
#a6afb9darkgray
#a6afb9darkgray
Accent
#404c59darkslategray
#404c59darkslategray
Accent foreground
#e1e5ealavender
#e1e5ealavender
Destructive
#e62e1aorangered
#e62e1aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#303336darkslategray
#303336darkslategray
Input
#373a3edarkslategray
#373a3edarkslategray
Ring
#e74d3ctomato
#e74d3ctomato

Contrast

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

Light mode
Text on background14.32:1AAA
Text on card16.24:1AAA
Primary button3.80:1AA Large
Secondary button7.95:1AAA
Muted text5.98:1AA
Accent6.94:1AA
Destructive4.41:1AA Large
Dark mode
Text on background14.32:1AAA
Text on card16.24:1AAA
Primary button3.80:1AA Large
Secondary button7.95:1AAA
Muted text5.98:1AA
Accent6.94:1AA
Destructive4.41:1AA Large

CSS variables

Paste this into your globals.css to use Secure Mandarin Red in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.265 0.015 251.853);
  --foreground: oklch(0.979 0.01 106.577);
  --muted: oklch(0.307 0.014 251.776);
  --muted-foreground: oklch(0.751 0.018 251.632);
  --popover: oklch(0.234 0.012 251.829);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.244 0.013 251.838);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.319 0.007 251.622);
  --input: oklch(0.348 0.008 251.627);
  --primary: oklch(0.631 0.193 29.743);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.786 0.041 25.494);
  --secondary-foreground: oklch(0.257 0.033 26.538);
  --accent: oklch(0.41 0.026 251.91);
  --accent-foreground: oklch(0.921 0.007 251.514);
  --destructive: oklch(0.598 0.22 30.517);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.631 0.193 29.743);
  --chart-1: oklch(0.631 0.193 29.743);
  --chart-2: oklch(0.786 0.041 25.494);
  --chart-3: oklch(0.41 0.026 251.91);
  --chart-4: oklch(0.812 0.035 25.402);
  --chart-5: oklch(0.634 0.199 29.895);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.265 0.015 251.853);
  --foreground: oklch(0.979 0.01 106.577);
  --muted: oklch(0.307 0.014 251.776);
  --muted-foreground: oklch(0.751 0.018 251.632);
  --popover: oklch(0.234 0.012 251.829);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.244 0.013 251.838);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.319 0.007 251.622);
  --input: oklch(0.348 0.008 251.627);
  --primary: oklch(0.631 0.193 29.743);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.786 0.041 25.494);
  --secondary-foreground: oklch(0.257 0.033 26.538);
  --accent: oklch(0.41 0.026 251.91);
  --accent-foreground: oklch(0.921 0.007 251.514);
  --destructive: oklch(0.598 0.22 30.517);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.631 0.193 29.743);
  --chart-1: oklch(0.631 0.193 29.743);
  --chart-2: oklch(0.786 0.041 25.494);
  --chart-3: oklch(0.41 0.026 251.91);
  --chart-4: oklch(0.812 0.035 25.402);
  --chart-5: oklch(0.634 0.199 29.895);
}