Community for shadcn/ui

Community is a shadcn/ui theme built around a light purple primary color (#eccbe8) with light cyan accents (#cbe8ec). The light mode uses a neutral background (#fefbfe). Dark mode keeps the light purple primary (#eccbe8) on a neutral background (#080207).

Color palette

TokenLightDark
Background
#fefbfewhite
#080207black
Foreground
#120210black
#ffffffwhite
Card
#fefbfewhite
#080207black
Card foreground
#120210black
#ffffffwhite
Popover
#fefbfewhite
#080207black
Popover foreground
#120210black
#ffffffwhite
Primary
#eccbe8gainsboro
#eccbe8gainsboro
Primary foreground
#61235aindigo
#61235aindigo
Secondary
#e8eccbantiquewhite
#e8eccbantiquewhite
Secondary foreground
#151608black
#151608black
Muted
#dcddd5gainsboro
#292a22darkslategray
Muted foreground
#585b49darkolivegreen
#b4b6a4darkgray
Accent
#cbe8ecgainsboro
#cbe8ecgainsboro
Accent foreground
#235a61darkslategray
#235a61darkslategray
Destructive
#c01307firebrick
#f61d0ered
Destructive foreground
#fffafasnow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#eccbe8gainsboro
#eccbe8gainsboro

Contrast

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

Light mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button7.50:1AAA
Secondary button15.04:1AAA
Muted text5.09:1AA
Accent6.02:1AA
Destructive6.08:1AA
Dark mode
Text on background20.52:1AAA
Text on card20.52:1AAA
Primary button7.50:1AAA
Secondary button15.04:1AAA
Muted text6.97:1AA
Accent6.02:1AA
Destructive4.10:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 329.193);
  --foreground: oklch(0.136 0.045 331.782);
  --muted: oklch(0.894 0.011 112.018);
  --muted-foreground: oklch(0.462 0.028 112.908);
  --popover: oklch(0.991 0.005 329.193);
  --popover-foreground: oklch(0.136 0.045 331.782);
  --card: oklch(0.991 0.005 329.193);
  --card-foreground: oklch(0.136 0.045 331.782);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.878 0.054 329.831);
  --primary-foreground: oklch(0.371 0.116 332.445);
  --secondary: oklch(0.932 0.044 112.665);
  --secondary-foreground: oklch(0.196 0.027 114.291);
  --accent: oklch(0.911 0.032 206.282);
  --accent-foreground: oklch(0.435 0.058 207.125);
  --destructive: oklch(0.513 0.202 29.784);
  --destructive-foreground: oklch(0.99 0.005 22.268);
  --ring: oklch(0.878 0.054 329.831);
  --chart-1: oklch(0.878 0.054 329.831);
  --chart-2: oklch(0.932 0.044 112.665);
  --chart-3: oklch(0.911 0.032 206.282);
  --chart-4: oklch(0.946 0.035 112.466);
  --chart-5: oklch(0.877 0.058 329.875);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.025 330.383);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.283 0.015 112.761);
  --muted-foreground: oklch(0.771 0.025 112.385);
  --popover: oklch(0.108 0.025 330.383);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.108 0.025 330.383);
  --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.878 0.054 329.831);
  --primary-foreground: oklch(0.371 0.116 332.445);
  --secondary: oklch(0.932 0.044 112.665);
  --secondary-foreground: oklch(0.196 0.027 114.291);
  --accent: oklch(0.911 0.032 206.282);
  --accent-foreground: oklch(0.435 0.058 207.125);
  --destructive: oklch(0.619 0.243 29.757);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.878 0.054 329.831);
  --chart-1: oklch(0.878 0.054 329.831);
  --chart-2: oklch(0.932 0.044 112.665);
  --chart-3: oklch(0.911 0.032 206.282);
  --chart-4: oklch(0.946 0.035 112.466);
  --chart-5: oklch(0.877 0.058 329.875);
}