Average for shadcn/ui

Average is a shadcn/ui theme built around a muted purple primary color (#c1aec2) with muted pink accents (#c2aeb8). The light mode uses a neutral background (#fdf6fd). Dark mode keeps the muted purple primary (#c1aec2) on a neutral background (#080208).

Color palette

TokenLightDark
Background
#fdf6fdsnow
#080208black
Foreground
#170317black
#f9f6f9whitesmoke
Card
#fdf2fdghostwhite
#0c030cblack
Card foreground
#120212black
#fbf9fbsnow
Popover
#fdf6fdsnow
#080208black
Popover foreground
#170317black
#f9f6f9whitesmoke
Primary
#c1aec2silver
#c1aec2silver
Primary foreground
#231a23black
#231a23black
Secondary
#b7aec2silver
#b7aec2silver
Secondary foreground
#1e1a23black
#1e1a23black
Muted
#e5dceflavender
#191023black
Muted foreground
#61566cdimgray
#9e93a9darkgray
Accent
#c2aeb8silver
#c2aeb8silver
Accent foreground
#231a1fblack
#231a1fblack
Destructive
#8c0d08darkred
#f1160ered
Destructive foreground
#fccccapink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c1aec2silver
#c1aec2silver

Contrast

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

Light mode
Text on background18.68:1AAA
Text on card18.47:1AAA
Primary button8.10:1AAA
Secondary button8.00:1AAA
Muted text5.16:1AA
Accent8.06:1AAA
Destructive6.74:1AA
Dark mode
Text on background19.12:1AAA
Text on card19.35:1AAA
Primary button8.10:1AAA
Secondary button8.00:1AAA
Muted text6.32:1AA
Accent8.06:1AAA
Destructive4.32:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.012 325.185);
  --foreground: oklch(0.151 0.055 327.29);
  --muted: oklch(0.907 0.029 307.421);
  --muted-foreground: oklch(0.472 0.036 306.897);
  --popover: oklch(0.982 0.012 325.185);
  --popover-foreground: oklch(0.151 0.055 327.29);
  --card: oklch(0.972 0.018 325.228);
  --card-foreground: oklch(0.136 0.049 327.293);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.772 0.036 325.414);
  --primary-foreground: oklch(0.233 0.021 325.688);
  --secondary: oklch(0.764 0.03 307.331);
  --secondary-foreground: oklch(0.228 0.017 306.898);
  --accent: oklch(0.77 0.027 345.16);
  --accent-foreground: oklch(0.231 0.016 345.942);
  --destructive: oklch(0.407 0.159 29.039);
  --destructive-foreground: oklch(0.886 0.055 20.553);
  --ring: oklch(0.772 0.036 325.414);
  --chart-1: oklch(0.772 0.036 325.414);
  --chart-2: oklch(0.764 0.03 307.331);
  --chart-3: oklch(0.77 0.027 345.16);
  --chart-4: oklch(0.79 0.027 307.396);
  --chart-5: oklch(0.771 0.043 325.48);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.025 326.668);
  --foreground: oklch(0.976 0.006 325.141);
  --muted: oklch(0.195 0.041 305.188);
  --muted-foreground: oklch(0.681 0.033 307.225);
  --popover: oklch(0.109 0.025 326.668);
  --popover-foreground: oklch(0.976 0.006 325.141);
  --card: oklch(0.124 0.028 326.635);
  --card-foreground: oklch(0.984 0.004 325.127);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.772 0.036 325.414);
  --primary-foreground: oklch(0.233 0.021 325.688);
  --secondary: oklch(0.764 0.03 307.331);
  --secondary-foreground: oklch(0.228 0.017 306.898);
  --accent: oklch(0.77 0.027 345.16);
  --accent-foreground: oklch(0.231 0.016 345.942);
  --destructive: oklch(0.607 0.242 29.225);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.772 0.036 325.414);
  --chart-1: oklch(0.772 0.036 325.414);
  --chart-2: oklch(0.764 0.03 307.331);
  --chart-3: oklch(0.77 0.027 345.16);
  --chart-4: oklch(0.79 0.027 307.396);
  --chart-5: oklch(0.771 0.043 325.48);
}