Dueling for shadcn/ui

Dueling is a shadcn/ui theme built around a near-white primary color (#fcfcfd) with muted light violet accents (#cfcad8). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#fcfcfd) on a neutral background (#040208).

Color palette

TokenLightDark
Background
#ffffffwhite
#040208black
Foreground
#06030dblack
#f9f8fcghostwhite
Card
#fcfcfcsnow
#06030cblack
Card foreground
#040208black
#fcfcfdwhite
Popover
#fcfcfcsnow
#06030cblack
Popover foreground
#040208black
#fcfcfdwhite
Primary
#fcfcfdwhite
#fcfcfdwhite
Primary foreground
#615b6bdimgray
#615b6bdimgray
Secondary
#e2e1e5gainsboro
#212121black
Secondary foreground
#484450darkslategray
#bab9bbsilver
Muted
#d8d3e4gainsboro
#211b2cblack
Muted foreground
#504c57darkslategray
#aba8b3darkgray
Accent
#cfcad8lightgrey
#2f2b36darkslategray
Accent foreground
#352f41darkslategray
#c7c4cfsilver
Destructive
#cb2e0bfirebrick
#f55b38tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fcfcfdwhite
#fcfcfdwhite

Contrast

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

Light mode
Text on background20.45:1AAA
Text on card20.19:1AAA
Primary button6.37:1AA
Secondary button7.26:1AAA
Muted text5.70:1AA
Accent7.99:1AAA
Destructive5.31:1AA
Dark mode
Text on background19.49:1AAA
Text on card19.92:1AAA
Primary button6.37:1AA
Secondary button8.24:1AAA
Muted text7.13:1AAA
Accent8.04:1AAA
Destructive6.41:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.111 0.029 301.812);
  --muted: oklch(0.876 0.024 301.05);
  --muted-foreground: oklch(0.424 0.019 300.761);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.097 0.025 302.16);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.097 0.025 302.16);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.992 0.001 301.484);
  --primary-foreground: oklch(0.484 0.026 300.627);
  --secondary: oklch(0.911 0.006 301.383);
  --secondary-foreground: oklch(0.395 0.02 300.664);
  --accent: oklch(0.847 0.021 301.097);
  --accent-foreground: oklch(0.32 0.032 299.837);
  --destructive: oklch(0.551 0.198 32.956);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.992 0.001 301.484);
  --chart-1: oklch(0.992 0.001 301.484);
  --chart-2: oklch(0.911 0.006 301.383);
  --chart-3: oklch(0.847 0.021 301.097);
  --chart-4: oklch(0.936 0.005 301.415);
  --chart-5: oklch(0.992 0.001 301.48);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.021 302.034);
  --foreground: oklch(0.982 0.004 301.42);
  --muted: oklch(0.238 0.033 299.178);
  --muted-foreground: oklch(0.737 0.017 301.127);
  --popover: oklch(0.114 0.025 301.826);
  --popover-foreground: oklch(0.991 0.002 301.457);
  --card: oklch(0.114 0.025 301.826);
  --card-foreground: oklch(0.991 0.002 301.457);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.992 0.001 301.484);
  --primary-foreground: oklch(0.484 0.026 300.627);
  --secondary: oklch(0.247 0.001 301.41);
  --secondary-foreground: oklch(0.788 0.002 301.452);
  --accent: oklch(0.298 0.02 300.427);
  --accent-foreground: oklch(0.826 0.017 301.165);
  --destructive: oklch(0.669 0.195 34.128);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.992 0.001 301.484);
  --chart-1: oklch(0.992 0.001 301.484);
  --chart-2: oklch(0.247 0.001 301.41);
  --chart-3: oklch(0.298 0.02 300.427);
  --chart-4: oklch(0.279 0.002 301.405);
  --chart-5: oklch(0.992 0.001 301.48);
}