Diction for shadcn/ui

Diction is a shadcn/ui theme built around a deep violet primary color (#3e145d) with deep teal accents (#145d3e). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#3e145d) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#ffffffwhite
#030104black
Foreground
#0c0212black
#fdfbfdsnow
Card
#fcfcfcsnow
#060208black
Card foreground
#09020eblack
#ffffffwhite
Popover
#ffffffwhite
#030104black
Popover foreground
#0c0212black
#fdfbfdsnow
Primary
#3e145dmidnightblue
#3e145dmidnightblue
Primary foreground
#d6b3efthistle
#d6b3efthistle
Secondary
#5d3e14saddlebrown
#5d3e14saddlebrown
Secondary foreground
#efd6b3wheat
#efd6b3wheat
Muted
#e7e1dagainsboro
#252018black
Muted foreground
#43403ddarkslategray
#c2c0bcsilver
Accent
#145d3edarkslategray
#145d3edarkslategray
Accent foreground
#b3efd6powderblue
#b3efd6powderblue
Destructive
#c52f11firebrick
#d83413firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3e145dmidnightblue
#3e145dmidnightblue

Contrast

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

Light mode
Text on background20.32:1AAA
Text on card20.01:1AAA
Primary button7.91:1AAA
Secondary button6.90:1AA
Muted text7.95:1AAA
Accent6.12:1AA
Destructive5.53:1AA
Dark mode
Text on background20.19:1AAA
Text on card20.58:1AAA
Primary button7.91:1AAA
Secondary button6.90:1AA
Muted text8.92:1AAA
Accent6.12:1AA
Destructive4.76:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.044 311.946);
  --muted: oklch(0.913 0.012 76.59);
  --muted-foreground: oklch(0.374 0.007 76.552);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.044 311.946);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.112 0.038 313.747);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.3 0.124 306.924);
  --primary-foreground: oklch(0.818 0.09 310.833);
  --secondary: oklch(0.391 0.071 71.684);
  --secondary-foreground: oklch(0.888 0.054 76.194);
  --accent: oklch(0.425 0.086 160.556);
  --accent-foreground: oklch(0.905 0.069 167.271);
  --destructive: oklch(0.541 0.19 32.715);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.3 0.124 306.924);
  --chart-1: oklch(0.3 0.124 306.924);
  --chart-2: oklch(0.391 0.071 71.684);
  --chart-3: oklch(0.425 0.086 160.556);
  --chart-4: oklch(0.426 0.078 71.438);
  --chart-5: oklch(0.3 0.128 306.587);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.082 0.019 313.619);
  --foreground: oklch(0.991 0.003 311.7);
  --muted: oklch(0.246 0.016 76.141);
  --muted-foreground: oklch(0.808 0.006 76.618);
  --popover: oklch(0.082 0.019 313.619);
  --popover-foreground: oklch(0.991 0.003 311.7);
  --card: oklch(0.103 0.024 313.619);
  --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.3 0.124 306.924);
  --primary-foreground: oklch(0.818 0.09 310.833);
  --secondary: oklch(0.391 0.071 71.684);
  --secondary-foreground: oklch(0.888 0.054 76.194);
  --accent: oklch(0.425 0.086 160.556);
  --accent-foreground: oklch(0.905 0.069 167.271);
  --destructive: oklch(0.578 0.205 32.67);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.3 0.124 306.924);
  --chart-1: oklch(0.3 0.124 306.924);
  --chart-2: oklch(0.391 0.071 71.684);
  --chart-3: oklch(0.425 0.086 160.556);
  --chart-4: oklch(0.426 0.078 71.438);
  --chart-5: oklch(0.3 0.128 306.587);
}