Deduction for shadcn/ui

Deduction is a shadcn/ui theme built around a near-black primary color (#000000) with muted light red accents (#d9c9c9). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#000000) on a red-tinted background (#0a0505).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a0505black
Foreground
#000000black
#faf9f9snow
Card
#ffffffwhite
#0a0505black
Card foreground
#000000black
#faf9f9snow
Popover
#ffffffwhite
#0a0505black
Popover foreground
#000000black
#faf9f9snow
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#e4dcdcgainsboro
#1a1414black
Secondary foreground
#513e3edarkslategray
#bca4a4darkgray
Muted
#e9e7e7linen
#181616black
Muted foreground
#5e4a4adarkolivegreen
#b5a1a1darkgray
Accent
#d9c9c9lightgrey
#382323darkslategray
Accent foreground
#422e2edarkslategray
#d4babasilver
Destructive
#a63d0csaddlebrown
#ed5712orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000000black
#000000black

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.37:1AAA
Secondary button7.41:1AAA
Muted text6.67:1AA
Accent7.90:1AAA
Destructive6.36:1AA
Dark mode
Text on background19.24:1AAA
Text on card19.24:1AAA
Primary button7.37:1AAA
Secondary button7.80:1AAA
Muted text7.37:1AAA
Accent8.00:1AAA
Destructive3.50:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.929 0.002 17.202);
  --muted-foreground: oklch(0.43 0.028 18.277);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.902 0.009 17.318);
  --secondary-foreground: oklch(0.384 0.026 18.35);
  --accent: oklch(0.849 0.019 17.524);
  --accent-foreground: oklch(0.325 0.03 18.817);
  --destructive: oklch(0.502 0.149 40.631);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.902 0.009 17.318);
  --chart-3: oklch(0.849 0.019 17.524);
  --chart-4: oklch(0.927 0.006 17.274);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.01 18.604);
  --foreground: oklch(0.984 0.001 17.178);
  --muted: oklch(0.202 0.004 17.462);
  --muted-foreground: oklch(0.726 0.024 17.712);
  --popover: oklch(0.126 0.01 18.604);
  --popover-foreground: oklch(0.984 0.001 17.178);
  --card: oklch(0.126 0.01 18.604);
  --card-foreground: oklch(0.984 0.001 17.178);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.198 0.011 18.156);
  --secondary-foreground: oklch(0.74 0.028 17.798);
  --accent: oklch(0.284 0.033 19.278);
  --accent-foreground: oklch(0.811 0.03 17.778);
  --destructive: oklch(0.65 0.197 40.06);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.198 0.011 18.156);
  --chart-3: oklch(0.284 0.033 19.278);
  --chart-4: oklch(0.229 0.015 18.277);
  --chart-5: oklch(0 0 0);
}