Duplexer for shadcn/ui

Duplexer is a shadcn/ui theme built around a muted deep blue primary color (#32383e) with muted deep green accents (#383e32). The light mode uses a neutral background (#f7fafc). Dark mode keeps the muted deep blue primary (#32383e) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7fafcghostwhite
#000000black
Foreground
#060d14black
#ffffffwhite
Card
#f7fafcghostwhite
#000000black
Card foreground
#060d14black
#ffffffwhite
Popover
#f7fafcghostwhite
#000000black
Popover foreground
#060d14black
#ffffffwhite
Primary
#32383edarkslategray
#32383edarkslategray
Primary foreground
#ccd1d6lightgrey
#ccd1d6lightgrey
Secondary
#3e3238darkslategray
#3e3238darkslategray
Secondary foreground
#d6ccd1lightgrey
#d6ccd1lightgrey
Muted
#eed8e3gainsboro
#27111cblack
Muted foreground
#494145darkslategray
#beb6basilver
Accent
#383e32darkslategray
#383e32darkslategray
Accent foreground
#d1d6cclightgrey
#d1d6cclightgrey
Destructive
#730707maroon
#e60f0fred
Destructive foreground
#fab2b2lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#32383edarkslategray
#32383edarkslategray

Contrast

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

Light mode
Text on background18.62:1AAA
Text on card18.62:1AAA
Primary button7.72:1AAA
Secondary button7.80:1AAA
Muted text7.31:1AAA
Accent7.44:1AAA
Destructive6.84:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.72:1AAA
Secondary button7.80:1AAA
Muted text8.95:1AAA
Accent7.44:1AAA
Destructive4.72:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.004 249.692);
  --foreground: oklch(0.153 0.02 248.439);
  --muted: oklch(0.903 0.029 346.838);
  --muted-foreground: oklch(0.384 0.013 346.896);
  --popover: oklch(0.983 0.004 249.692);
  --popover-foreground: oklch(0.153 0.02 248.439);
  --card: oklch(0.983 0.004 249.692);
  --card-foreground: oklch(0.153 0.02 248.439);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.337 0.014 250.013);
  --primary-foreground: oklch(0.858 0.009 249.748);
  --secondary: oklch(0.333 0.02 347.569);
  --secondary-foreground: oklch(0.855 0.013 346.416);
  --accent: oklch(0.355 0.022 129.818);
  --accent-foreground: oklch(0.87 0.015 129.307);
  --destructive: oklch(0.354 0.138 28.244);
  --destructive-foreground: oklch(0.832 0.084 19.004);
  --ring: oklch(0.337 0.014 250.013);
  --chart-1: oklch(0.337 0.014 250.013);
  --chart-2: oklch(0.333 0.02 347.569);
  --chart-3: oklch(0.355 0.022 129.818);
  --chart-4: oklch(0.361 0.023 347.607);
  --chart-5: oklch(0.336 0.018 250.108);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.214 0.041 350.753);
  --muted-foreground: oklch(0.784 0.011 346.381);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.337 0.014 250.013);
  --primary-foreground: oklch(0.858 0.009 249.748);
  --secondary: oklch(0.333 0.02 347.569);
  --secondary-foreground: oklch(0.855 0.013 346.416);
  --accent: oklch(0.355 0.022 129.818);
  --accent-foreground: oklch(0.87 0.015 129.307);
  --destructive: oklch(0.585 0.235 28.767);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.337 0.014 250.013);
  --chart-1: oklch(0.337 0.014 250.013);
  --chart-2: oklch(0.333 0.02 347.569);
  --chart-3: oklch(0.355 0.022 129.818);
  --chart-4: oklch(0.361 0.023 347.607);
  --chart-5: oklch(0.336 0.018 250.108);
}