Mirage (High-contrast) for shadcn/ui

Mirage (High-contrast) is a shadcn/ui theme built around a muted blue primary color (#5d74a2) with blue accents (#334a6b). The light mode uses a blue-tinted background (#1b2637). Dark mode keeps the muted blue primary (#5d74a2) on a blue-tinted background (#1b2637).

Color palette

TokenLightDark
Background
#1b2637darkslategray
#1b2637darkslategray
Foreground
#bababasilver
#bababasilver
Card
#172230darkslategray
#172230darkslategray
Card foreground
#c7c7c7silver
#c7c7c7silver
Popover
#161f2dblack
#161f2dblack
Popover foreground
#d4d4d4lightgrey
#d4d4d4lightgrey
Primary
#5d74a2slategray
#5d74a2slategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#b4bccasilver
#b4bccasilver
Secondary foreground
#20242ddarkslategray
#20242ddarkslategray
Muted
#2d3239darkslategray
#2d3239darkslategray
Muted foreground
#a9b1bcdarkgray
#a9b1bcdarkgray
Accent
#334a6bdarkslategray
#334a6bdarkslategray
Accent foreground
#e0e7f0lavender
#e0e7f0lavender
Destructive
#fb3218orangered
#fb3218orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#283343darkslategray
#283343darkslategray
Input
#2e3b4ddarkslategray
#2e3b4ddarkslategray
Ring
#5d74a2slategray
#5d74a2slategray

Contrast

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

Light mode
Text on background7.82:1AAA
Text on card9.52:1AAA
Primary button4.68:1AA
Secondary button8.11:1AAA
Muted text5.96:1AA
Accent7.18:1AAA
Destructive3.75:1AA Large
Dark mode
Text on background7.82:1AAA
Text on card9.52:1AAA
Primary button4.68:1AA
Secondary button8.11:1AAA
Muted text5.96:1AA
Accent7.18:1AAA
Destructive3.75:1AA Large

CSS variables

Paste this into your globals.css to use Mirage (High-contrast) in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.268 0.035 256.874);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.315 0.015 256.783);
  --muted-foreground: oklch(0.758 0.018 256.732);
  --popover: oklch(0.238 0.03 256.866);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.248 0.032 256.869);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.319 0.032 256.842);
  --input: oklch(0.347 0.036 256.845);
  --primary: oklch(0.56 0.077 263.657);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.793 0.022 264.442);
  --secondary-foreground: oklch(0.26 0.018 264.206);
  --accent: oklch(0.407 0.062 256.902);
  --accent-foreground: oklch(0.925 0.015 256.71);
  --destructive: oklch(0.64 0.237 30.988);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.56 0.077 263.657);
  --chart-1: oklch(0.56 0.077 263.657);
  --chart-2: oklch(0.793 0.022 264.442);
  --chart-3: oklch(0.407 0.062 256.902);
  --chart-4: oklch(0.818 0.019 264.463);
  --chart-5: oklch(0.556 0.085 263.516);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.268 0.035 256.874);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.315 0.015 256.783);
  --muted-foreground: oklch(0.758 0.018 256.732);
  --popover: oklch(0.238 0.03 256.866);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.248 0.032 256.869);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.319 0.032 256.842);
  --input: oklch(0.347 0.036 256.845);
  --primary: oklch(0.56 0.077 263.657);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.793 0.022 264.442);
  --secondary-foreground: oklch(0.26 0.018 264.206);
  --accent: oklch(0.407 0.062 256.902);
  --accent-foreground: oklch(0.925 0.015 256.71);
  --destructive: oklch(0.64 0.237 30.988);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.56 0.077 263.657);
  --chart-1: oklch(0.56 0.077 263.657);
  --chart-2: oklch(0.793 0.022 264.442);
  --chart-3: oklch(0.407 0.062 256.902);
  --chart-4: oklch(0.818 0.019 264.463);
  --chart-5: oklch(0.556 0.085 263.516);
}