Communion for shadcn/ui

Communion is a shadcn/ui theme built around a light pink primary color (#f2a6c2) with light teal accents (#a6f2d6). The light mode uses a neutral background (#fdf7f9). Dark mode keeps the light pink primary (#f2a6c2) on a pink-tinted background (#0f0609).

Color palette

TokenLightDark
Background
#fdf7f9snow
#0f0609black
Foreground
#090104black
#fdfcfcsnow
Card
#fdf7f9snow
#0f0609black
Card foreground
#090104black
#fdfcfcsnow
Popover
#fdf7f9snow
#0f0609black
Popover foreground
#090104black
#fdfcfcsnow
Primary
#f2a6c2lightpink
#f2a6c2lightpink
Primary foreground
#590d29maroon
#590d29maroon
Secondary
#a6f2d6paleturquoise
#a6f2d6paleturquoise
Secondary foreground
#0d593ddarkslategray
#0d593ddarkslategray
Muted
#e3f3edhoneydew
#0c1c17black
Muted foreground
#585a59dimgray
#a5a7a6darkgray
Accent
#a6f2d6paleturquoise
#a6f2d6paleturquoise
Accent foreground
#0d593ddarkslategray
#0d593ddarkslategray
Destructive
#e20303red
#fc3131crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f2a6c2lightpink
#f2a6c2lightpink

Contrast

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

Light mode
Text on background19.51:1AAA
Text on card19.51:1AAA
Primary button7.26:1AAA
Secondary button6.49:1AA
Muted text6.03:1AA
Accent6.49:1AA
Destructive4.93:1AA
Dark mode
Text on background19.56:1AAA
Text on card19.56:1AAA
Primary button7.26:1AAA
Secondary button6.49:1AA
Muted text7.24:1AAA
Accent6.49:1AA
Destructive3.73:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 352.76);
  --foreground: oklch(0.102 0.026 352.056);
  --muted: oklch(0.949 0.018 172);
  --muted-foreground: oklch(0.466 0.002 172.42);
  --popover: oklch(0.981 0.006 352.76);
  --popover-foreground: oklch(0.102 0.026 352.056);
  --card: oklch(0.981 0.006 352.76);
  --card-foreground: oklch(0.102 0.026 352.056);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.806 0.096 355.814);
  --primary-foreground: oklch(0.31 0.109 4.912);
  --secondary: oklch(0.904 0.085 169.452);
  --secondary-foreground: oklch(0.413 0.085 162.43);
  --accent: oklch(0.904 0.085 169.452);
  --accent-foreground: oklch(0.413 0.085 162.43);
  --destructive: oklch(0.574 0.234 29.122);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.806 0.096 355.814);
  --chart-1: oklch(0.806 0.096 355.814);
  --chart-2: oklch(0.904 0.085 169.452);
  --chart-3: oklch(0.904 0.085 169.452);
  --chart-4: oklch(0.917 0.073 170.007);
  --chart-5: oklch(0.805 0.1 355.948);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.02 353.818);
  --foreground: oklch(0.992 0.001 352.604);
  --muted: oklch(0.212 0.025 168.472);
  --muted-foreground: oklch(0.726 0.002 172.486);
  --popover: oklch(0.136 0.02 353.818);
  --popover-foreground: oklch(0.992 0.001 352.604);
  --card: oklch(0.136 0.02 353.818);
  --card-foreground: oklch(0.992 0.001 352.604);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.806 0.096 355.814);
  --primary-foreground: oklch(0.31 0.109 4.912);
  --secondary: oklch(0.904 0.085 169.452);
  --secondary-foreground: oklch(0.413 0.085 162.43);
  --accent: oklch(0.904 0.085 169.452);
  --accent-foreground: oklch(0.413 0.085 162.43);
  --destructive: oklch(0.642 0.236 27.057);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.806 0.096 355.814);
  --chart-1: oklch(0.806 0.096 355.814);
  --chart-2: oklch(0.904 0.085 169.452);
  --chart-3: oklch(0.904 0.085 169.452);
  --chart-4: oklch(0.917 0.073 170.007);
  --chart-5: oklch(0.805 0.1 355.948);
}