↓ Skip to main content

“It’s a bit weird to me that the midpoint between blue and yellow is gray.”

Josh W. Comeaujoshwcomeau.com ↗

CSS averages red, green and blue separately, so yellow to blue passes through mud. Painters have known for centuries that the midpoint should stay saturated. The fix is to interpolate in a different color space or add midpoints by hand. Browsers shipped the naive math as the default, and every designer has been working around it ever since.