Community for shadcn/ui

Community is a shadcn/ui theme built around a blue primary color (#60acd2) with orange accents (#d28660). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#60acd2) on a blue-tinted background (#04090b).

Color palette

TokenLightDark
Background
#ffffffwhite
#04090bblack
Foreground
#000000black
#f6f8f8whitesmoke
Card
#fcfcfcsnow
#050c0fblack
Card foreground
#000000black
#f9fafbghostwhite
Popover
#ffffffwhite
#04090bblack
Popover foreground
#000000black
#f6f8f8whitesmoke
Primary
#60acd2cornflowerblue
#60acd2cornflowerblue
Primary foreground
#000000black
#000000black
Secondary
#d28660peru
#d28660peru
Secondary foreground
#000000black
#000000black
Muted
#efe2dcantiquewhite
#231610black
Muted foreground
#474747darkslategray
#b8b8b8silver
Accent
#d28660peru
#d28660peru
Accent foreground
#000000black
#000000black
Destructive
#a02d03saddlebrown
#fa5519orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#60acd2cornflowerblue
#60acd2cornflowerblue

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button8.33:1AAA
Secondary button7.32:1AAA
Muted text7.35:1AAA
Accent7.32:1AAA
Destructive7.31:1AAA
Dark mode
Text on background18.78:1AAA
Text on card18.85:1AAA
Primary button8.33:1AAA
Secondary button7.32:1AAA
Muted text8.84:1AAA
Accent7.32:1AAA
Destructive6.39:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.922 0.016 48.541);
  --muted-foreground: oklch(0.399 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.71 0.094 231.908);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.691 0.108 46.982);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.691 0.108 46.982);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.471 0.157 36.555);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.71 0.094 231.908);
  --chart-1: oklch(0.71 0.094 231.908);
  --chart-2: oklch(0.691 0.108 46.982);
  --chart-3: oklch(0.691 0.108 46.982);
  --chart-4: oklch(0.713 0.099 47.235);
  --chart-5: oklch(0.713 0.098 232.157);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.012 223.745);
  --foreground: oklch(0.977 0.002 228.775);
  --muted: oklch(0.216 0.024 47.587);
  --muted-foreground: oklch(0.781 0 180);
  --popover: oklch(0.134 0.012 223.745);
  --popover-foreground: oklch(0.977 0.002 228.775);
  --card: oklch(0.148 0.014 227.243);
  --card-foreground: oklch(0.985 0.001 228.767);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.71 0.094 231.908);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.691 0.108 46.982);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.691 0.108 46.982);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.669 0.211 37.499);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.71 0.094 231.908);
  --chart-1: oklch(0.71 0.094 231.908);
  --chart-2: oklch(0.691 0.108 46.982);
  --chart-3: oklch(0.691 0.108 46.982);
  --chart-4: oklch(0.713 0.099 47.235);
  --chart-5: oklch(0.713 0.098 232.157);
}