Average for shadcn/ui

Average is a shadcn/ui theme built around a green primary color (#74d875) with red accents (#d87574). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#74d875) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#fbfefbwhite
#020302black
Foreground
#010401black
#f9fbf9mintcream
Card
#fbfefbwhite
#020302black
Card foreground
#010401black
#f9fbf9mintcream
Popover
#fbfefbwhite
#020302black
Popover foreground
#010401black
#f9fbf9mintcream
Primary
#74d875lightgreen
#74d875lightgreen
Primary foreground
#061406black
#061406black
Secondary
#7574d8mediumslateblue
#7574d8mediumslateblue
Secondary foreground
#000000black
#000000black
Muted
#e8e8edlavender
#121217black
Muted foreground
#5a5a5edimgray
#a1a1a5darkgray
Accent
#d87574lightcoral
#d87574lightcoral
Accent foreground
#140606black
#140606black
Destructive
#b80300darkred
#ff3633tomato
Destructive foreground
#ffebeblinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#74d875lightgreen
#74d875lightgreen

Contrast

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

Light mode
Text on background20.27:1AAA
Text on card20.27:1AAA
Primary button10.62:1AAA
Secondary button5.23:1AA
Muted text5.62:1AA
Accent6.35:1AA
Destructive6.02:1AA
Dark mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button10.62:1AAA
Secondary button5.23:1AA
Muted text7.26:1AAA
Accent6.35:1AA
Destructive3.59: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.994 0.005 146.013);
  --foreground: oklch(0.097 0.02 144.321);
  --muted: oklch(0.932 0.007 287.029);
  --muted-foreground: oklch(0.469 0.006 286.939);
  --popover: oklch(0.994 0.005 146.013);
  --popover-foreground: oklch(0.097 0.02 144.321);
  --card: oklch(0.994 0.005 146.013);
  --card-foreground: oklch(0.097 0.02 144.321);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.797 0.165 144.166);
  --primary-foreground: oklch(0.172 0.036 144.238);
  --secondary: oklch(0.607 0.149 281.77);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.674 0.123 21.882);
  --accent-foreground: oklch(0.145 0.027 22.294);
  --destructive: oklch(0.492 0.201 29.429);
  --destructive-foreground: oklch(0.956 0.022 18.719);
  --ring: oklch(0.797 0.165 144.166);
  --chart-1: oklch(0.797 0.165 144.166);
  --chart-2: oklch(0.607 0.149 281.77);
  --chart-3: oklch(0.674 0.123 21.882);
  --chart-4: oklch(0.64 0.135 282.658);
  --chart-5: oklch(0.802 0.172 144.081);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.012 145.077);
  --foreground: oklch(0.986 0.004 146.024);
  --muted: oklch(0.184 0.011 286.053);
  --muted-foreground: oklch(0.711 0.005 287.034);
  --popover: oklch(0.095 0.012 145.077);
  --popover-foreground: oklch(0.986 0.004 146.024);
  --card: oklch(0.095 0.012 145.077);
  --card-foreground: oklch(0.986 0.004 146.024);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.797 0.165 144.166);
  --primary-foreground: oklch(0.172 0.036 144.238);
  --secondary: oklch(0.607 0.149 281.77);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.674 0.123 21.882);
  --accent-foreground: oklch(0.145 0.027 22.294);
  --destructive: oklch(0.651 0.235 27.421);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.797 0.165 144.166);
  --chart-1: oklch(0.797 0.165 144.166);
  --chart-2: oklch(0.607 0.149 281.77);
  --chart-3: oklch(0.674 0.123 21.882);
  --chart-4: oklch(0.64 0.135 282.658);
  --chart-5: oklch(0.802 0.172 144.081);
}