Average for shadcn/ui

Average is a shadcn/ui theme built around a vivid light purple primary color (#fad6ef) with vivid light red accents (#fad6dd). The light mode uses a neutral background (#fefbfd). Dark mode keeps the vivid light purple primary (#fad6ef) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#fefbfdsnow
#040103black
Foreground
#090106black
#faf5f8whitesmoke
Card
#fefbfdsnow
#040103black
Card foreground
#090106black
#faf5f8whitesmoke
Popover
#fefbfdsnow
#040103black
Popover foreground
#090106black
#faf5f8whitesmoke
Primary
#fad6efmistyrose
#fad6efmistyrose
Primary foreground
#8d1166purple
#8d1166purple
Secondary
#f4d6falavender
#f4d6falavender
Secondary foreground
#77118dpurple
#77118dpurple
Muted
#f5eef7whitesmoke
#0f0811black
Muted foreground
#5a4b5ddimgray
#b1a2b4darkgray
Accent
#fad6ddmistyrose
#fad6ddmistyrose
Accent foreground
#8d1127brown
#8d1127brown
Destructive
#941d05darkred
#f6350eorangered
Destructive foreground
#fdd6cebisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fad6efmistyrose
#fad6efmistyrose

Contrast

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

Light mode
Text on background20.07:1AAA
Text on card20.07:1AAA
Primary button6.62:1AA
Secondary button7.03:1AAA
Muted text7.09:1AAA
Accent7.01:1AAA
Destructive6.45:1AA
Dark mode
Text on background19.25:1AAA
Text on card19.25:1AAA
Primary button6.62:1AA
Secondary button7.03:1AAA
Muted text8.15:1AAA
Accent7.01:1AAA
Destructive3.86: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.991 0.003 336.624);
  --foreground: oklch(0.104 0.029 337.17);
  --muted: oklch(0.957 0.014 320.004);
  --muted-foreground: oklch(0.435 0.036 320.061);
  --popover: oklch(0.991 0.003 336.624);
  --popover-foreground: oklch(0.104 0.029 337.17);
  --card: oklch(0.991 0.003 336.624);
  --card-foreground: oklch(0.104 0.029 337.17);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.913 0.052 337.622);
  --primary-foreground: oklch(0.436 0.174 345.531);
  --secondary: oklch(0.911 0.058 320.047);
  --secondary-foreground: oklch(0.422 0.191 318.833);
  --accent: oklch(0.908 0.041 5.497);
  --accent-foreground: oklch(0.416 0.156 19.133);
  --destructive: oklch(0.433 0.157 32.546);
  --destructive-foreground: oklch(0.906 0.046 31.226);
  --ring: oklch(0.913 0.052 337.622);
  --chart-1: oklch(0.913 0.052 337.622);
  --chart-2: oklch(0.911 0.058 320.047);
  --chart-3: oklch(0.908 0.041 5.497);
  --chart-4: oklch(0.941 0.038 320.028);
  --chart-5: oklch(0.913 0.053 337.662);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.016 336.979);
  --foreground: oklch(0.974 0.007 336.708);
  --muted: oklch(0.151 0.022 320.157);
  --muted-foreground: oklch(0.73 0.031 320.03);
  --popover: oklch(0.086 0.016 336.979);
  --popover-foreground: oklch(0.974 0.007 336.708);
  --card: oklch(0.086 0.016 336.979);
  --card-foreground: oklch(0.974 0.007 336.708);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.913 0.052 337.622);
  --primary-foreground: oklch(0.436 0.174 345.531);
  --secondary: oklch(0.911 0.058 320.047);
  --secondary-foreground: oklch(0.422 0.191 318.833);
  --accent: oklch(0.908 0.041 5.497);
  --accent-foreground: oklch(0.416 0.156 19.133);
  --destructive: oklch(0.632 0.232 32.281);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.913 0.052 337.622);
  --chart-1: oklch(0.913 0.052 337.622);
  --chart-2: oklch(0.911 0.058 320.047);
  --chart-3: oklch(0.908 0.041 5.497);
  --chart-4: oklch(0.941 0.038 320.028);
  --chart-5: oklch(0.913 0.053 337.662);
}