Synthesis for shadcn/ui

Synthesis is a shadcn/ui theme built around a violet primary color (#6a4488) with purple accents (#884483). The light mode uses a neutral background (#faf8fc). Dark mode keeps the violet primary (#6a4488) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#000000black
Foreground
#08040cblack
#fdfcfdwhite
Card
#faf8fcghostwhite
#000000black
Card foreground
#08040cblack
#fdfcfdwhite
Popover
#faf8fcghostwhite
#000000black
Popover foreground
#08040cblack
#fdfcfdwhite
Primary
#6a4488rebeccapurple
#6a4488rebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#494488darkslateblue
#494488darkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d8d7e0gainsboro
#201f28black
Muted foreground
#52515cdimgray
#a4a3aedarkgray
Accent
#884483rebeccapurple
#884483rebeccapurple
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#861109darkred
#e61d0fred
Destructive foreground
#fbc9c5pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6a4488rebeccapurple
#6a4488rebeccapurple

Contrast

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

Light mode
Text on background19.27:1AAA
Text on card19.27:1AAA
Primary button7.47:1AAA
Secondary button8.49:1AAA
Muted text5.46:1AA
Accent6.55:1AA
Destructive6.78:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button7.47:1AAA
Secondary button8.49:1AAA
Muted text6.52:1AA
Accent6.55:1AA
Destructive4.61:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 311.039);
  --foreground: oklch(0.119 0.023 312.493);
  --muted: oklch(0.882 0.012 289.229);
  --muted-foreground: oklch(0.441 0.017 288.747);
  --popover: oklch(0.982 0.005 311.039);
  --popover-foreground: oklch(0.119 0.023 312.493);
  --card: oklch(0.982 0.005 311.039);
  --card-foreground: oklch(0.119 0.023 312.493);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.461 0.113 308.764);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.427 0.109 283.809);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.495 0.124 329.768);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.398 0.152 29.672);
  --destructive-foreground: oklch(0.879 0.058 23.062);
  --ring: oklch(0.461 0.113 308.764);
  --chart-1: oklch(0.461 0.113 308.764);
  --chart-2: oklch(0.427 0.109 283.809);
  --chart-3: oklch(0.495 0.124 329.768);
  --chart-4: oklch(0.449 0.115 283.742);
  --chart-5: oklch(0.458 0.122 308.496);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 311.067);
  --muted: oklch(0.245 0.016 288.201);
  --muted-foreground: oklch(0.72 0.015 289.086);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.002 311.067);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.991 0.002 311.067);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.461 0.113 308.764);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.427 0.109 283.809);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.495 0.124 329.768);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.59 0.23 29.75);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.461 0.113 308.764);
  --chart-1: oklch(0.461 0.113 308.764);
  --chart-2: oklch(0.427 0.109 283.809);
  --chart-3: oklch(0.495 0.124 329.768);
  --chart-4: oklch(0.449 0.115 283.742);
  --chart-5: oklch(0.458 0.122 308.496);
}