Dual for shadcn/ui

Dual is a shadcn/ui theme built around a deep pink primary color (#6a1140) with muted light pink accents (#ebe5e8). The light mode uses a neutral background (#fefbfd). Dark mode keeps the deep pink primary (#6a1140) on a pink-tinted background (#0a0508).

Color palette

TokenLightDark
Background
#fefbfdsnow
#0a0508black
Foreground
#090105black
#fbf9fasnow
Card
#fdf7fasnow
#0e070ablack
Card foreground
#040103black
#fdfcfcsnow
Popover
#fdf7fasnow
#0e070ablack
Popover foreground
#040103black
#fdfcfcsnow
Primary
#6a1140brown
#6a1140brown
Primary foreground
#f4b8d8pink
#f4b8d8pink
Secondary
#ebe5e8linen
#362b31darkslategray
Secondary foreground
#5a4450darkslategray
#d0c3cathistle
Muted
#f3e7eelinen
#180c12black
Muted foreground
#674c5adimgray
#b398a7darkgray
Accent
#ebe5e8linen
#362b31darkslategray
Accent foreground
#5a4450darkslategray
#d0c3cathistle
Destructive
#732607maroon
#f26831tomato
Destructive foreground
#fac7b2peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6a1140brown
#6a1140brown

Contrast

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

Light mode
Text on background20.03:1AAA
Text on card19.60:1AAA
Primary button7.20:1AAA
Secondary button7.10:1AAA
Muted text6.33:1AA
Accent7.10:1AAA
Destructive6.90:1AA
Dark mode
Text on background19.29:1AAA
Text on card19.50:1AAA
Primary button7.20:1AAA
Secondary button7.99:1AAA
Muted text7.25:1AAA
Accent7.99:1AAA
Destructive6.77:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 343.552);
  --foreground: oklch(0.103 0.029 343.322);
  --muted: oklch(0.939 0.016 343.869);
  --muted-foreground: oklch(0.449 0.042 345.65);
  --popover: oklch(0.981 0.009 343.662);
  --popover-foreground: oklch(0.082 0.023 343.322);
  --card: oklch(0.981 0.009 343.662);
  --card-foreground: oklch(0.082 0.023 343.322);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.354 0.129 353.864);
  --primary-foreground: oklch(0.847 0.08 345.665);
  --secondary: oklch(0.927 0.008 343.668);
  --secondary-foreground: oklch(0.414 0.035 345.468);
  --accent: oklch(0.927 0.008 343.668);
  --accent-foreground: oklch(0.414 0.035 345.468);
  --destructive: oklch(0.382 0.115 38.942);
  --destructive-foreground: oklch(0.869 0.065 42.63);
  --ring: oklch(0.354 0.129 353.864);
  --chart-1: oklch(0.354 0.129 353.864);
  --chart-2: oklch(0.927 0.008 343.668);
  --chart-3: oklch(0.927 0.008 343.668);
  --chart-4: oklch(0.952 0.005 343.589);
  --chart-5: oklch(0.356 0.132 354.335);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.015 343.399);
  --foreground: oklch(0.983 0.003 343.534);
  --muted: oklch(0.173 0.025 346.774);
  --muted-foreground: oklch(0.709 0.037 344.714);
  --popover: oklch(0.139 0.017 344.841);
  --popover-foreground: oklch(0.992 0.002 343.489);
  --card: oklch(0.139 0.017 344.841);
  --card-foreground: oklch(0.992 0.002 343.489);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.354 0.129 353.864);
  --primary-foreground: oklch(0.847 0.08 345.665);
  --secondary: oklch(0.303 0.02 345.03);
  --secondary-foreground: oklch(0.83 0.017 343.954);
  --accent: oklch(0.303 0.02 345.03);
  --accent-foreground: oklch(0.83 0.017 343.954);
  --destructive: oklch(0.68 0.183 40.316);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.354 0.129 353.864);
  --chart-1: oklch(0.354 0.129 353.864);
  --chart-2: oklch(0.303 0.02 345.03);
  --chart-3: oklch(0.303 0.02 345.03);
  --chart-4: oklch(0.332 0.023 345.08);
  --chart-5: oklch(0.356 0.132 354.335);
}