Deduce for shadcn/ui

Deduce is a shadcn/ui theme built around a purple primary color (#c954b4) with green accents (#54c96a). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#c954b4) on a purple-tinted background (#0b040a).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b040ablack
Foreground
#000000black
#fbf9fbsnow
Card
#ffffffwhite
#0b040ablack
Card foreground
#000000black
#fbf9fbsnow
Popover
#ffffffwhite
#0b040ablack
Popover foreground
#000000black
#fbf9fbsnow
Primary
#c954b4mediumorchid
#c954b4mediumorchid
Primary foreground
#000000black
#000000black
Secondary
#54c96amediumseagreen
#54c96amediumseagreen
Secondary foreground
#000000black
#000000black
Muted
#d2ead6gainsboro
#152d19black
Muted foreground
#576b5bdimgray
#94a898darkseagreen
Accent
#54c96amediumseagreen
#54c96amediumseagreen
Accent foreground
#000000black
#000000black
Destructive
#ad130bfirebrick
#dd180ered
Destructive foreground
#feedeclinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c954b4mediumorchid
#c954b4mediumorchid

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 button5.42:1AA
Secondary button9.95:1AAA
Muted text4.50:1AA
Accent9.95:1AAA
Destructive6.46:1AA
Dark mode
Text on background19.31:1AAA
Text on card19.31:1AAA
Primary button5.42:1AA
Secondary button9.95:1AAA
Muted text5.82:1AA
Accent9.95:1AAA
Destructive5.00:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.914 0.037 150.806);
  --muted-foreground: oklch(0.505 0.034 150.396);
  --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.629 0.185 335.265);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.747 0.17 147.274);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.747 0.17 147.274);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.476 0.185 29.386);
  --destructive-foreground: oklch(0.959 0.019 21.141);
  --ring: oklch(0.629 0.185 335.265);
  --chart-1: oklch(0.629 0.185 335.265);
  --chart-2: oklch(0.747 0.17 147.274);
  --chart-3: oklch(0.747 0.17 147.274);
  --chart-4: oklch(0.762 0.161 147.693);
  --chart-5: oklch(0.631 0.194 335.455);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.02 332.208);
  --foreground: oklch(0.984 0.003 331.456);
  --muted: oklch(0.272 0.048 148.441);
  --muted-foreground: oklch(0.711 0.031 150.756);
  --popover: oklch(0.126 0.02 332.208);
  --popover-foreground: oklch(0.984 0.003 331.456);
  --card: oklch(0.126 0.02 332.208);
  --card-foreground: oklch(0.984 0.003 331.456);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.629 0.185 335.265);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.747 0.17 147.274);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.747 0.17 147.274);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.57 0.224 29.444);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.629 0.185 335.265);
  --chart-1: oklch(0.629 0.185 335.265);
  --chart-2: oklch(0.747 0.17 147.274);
  --chart-3: oklch(0.747 0.17 147.274);
  --chart-4: oklch(0.762 0.161 147.693);
  --chart-5: oklch(0.631 0.194 335.455);
}