Communication for shadcn/ui

Communication is a shadcn/ui theme built around a violet primary color (#6b50aa) with muted light violet accents (#dcdae2). The light mode uses a neutral background (#f9f7fd). Dark mode keeps the violet primary (#6b50aa) on a neutral background (#040208).

Color palette

TokenLightDark
Background
#f9f7fdghostwhite
#040208black
Foreground
#06020dblack
#f6f5fawhitesmoke
Card
#f9f7fdghostwhite
#040208black
Card foreground
#06020dblack
#f6f5fawhitesmoke
Popover
#f9f7fdghostwhite
#040208black
Popover foreground
#06020dblack
#f6f5fawhitesmoke
Primary
#6b50aarebeccapurple
#6b50aarebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dcdae2gainsboro
#1d1924black
Secondary foreground
#413c4edarkslategray
#b3abc4silver
Muted
#edeaf5lavender
#0d0a15black
Muted foreground
#605e64dimgray
#9d9ba1darkgray
Accent
#dcdae2gainsboro
#1d1924black
Accent foreground
#413c4edarkslategray
#b3abc4silver
Destructive
#7d1408maroon
#f0260forangered
Destructive foreground
#fbc2bclightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6b50aarebeccapurple
#6b50aarebeccapurple

Contrast

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

Light mode
Text on background19.26:1AAA
Text on card19.26:1AAA
Primary button6.26:1AA
Secondary button7.63:1AAA
Muted text5.39:1AA
Accent7.63:1AAA
Destructive6.88:1AA
Dark mode
Text on background19.02:1AAA
Text on card19.02:1AAA
Primary button6.26:1AA
Secondary button7.82:1AAA
Muted text7.13:1AAA
Accent7.82:1AAA
Destructive4.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.009 299.886);
  --foreground: oklch(0.108 0.032 299.931);
  --muted: oklch(0.943 0.016 299.761);
  --muted-foreground: oklch(0.485 0.009 299.712);
  --popover: oklch(0.978 0.009 299.886);
  --popover-foreground: oklch(0.108 0.032 299.931);
  --card: oklch(0.978 0.009 299.886);
  --card-foreground: oklch(0.108 0.032 299.931);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.503 0.139 294.738);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.892 0.012 299.812);
  --secondary-foreground: oklch(0.368 0.031 298.601);
  --accent: oklch(0.892 0.012 299.812);
  --accent-foreground: oklch(0.368 0.031 298.601);
  --destructive: oklch(0.381 0.141 30.55);
  --destructive-foreground: oklch(0.863 0.066 25.794);
  --ring: oklch(0.503 0.139 294.738);
  --chart-1: oklch(0.503 0.139 294.738);
  --chart-2: oklch(0.892 0.012 299.812);
  --chart-3: oklch(0.892 0.012 299.812);
  --chart-4: oklch(0.917 0.009 299.87);
  --chart-5: oklch(0.498 0.149 294.134);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.023 300.281);
  --foreground: oklch(0.972 0.007 299.912);
  --muted: oklch(0.154 0.024 297.268);
  --muted-foreground: oklch(0.693 0.009 299.829);
  --popover: oklch(0.098 0.023 300.281);
  --popover-foreground: oklch(0.972 0.007 299.912);
  --card: oklch(0.098 0.023 300.281);
  --card-foreground: oklch(0.972 0.007 299.912);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.503 0.139 294.738);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.224 0.02 298.475);
  --secondary-foreground: oklch(0.757 0.035 299.252);
  --accent: oklch(0.224 0.02 298.475);
  --accent-foreground: oklch(0.757 0.035 299.252);
  --destructive: oklch(0.611 0.234 30.458);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.503 0.139 294.738);
  --chart-1: oklch(0.503 0.139 294.738);
  --chart-2: oklch(0.224 0.02 298.475);
  --chart-3: oklch(0.224 0.02 298.475);
  --chart-4: oklch(0.253 0.025 298.359);
  --chart-5: oklch(0.498 0.149 294.134);
}