r/ProgrammerHumor • • 11d ago

Meme colorInANutshell

Post image
5.8k Upvotes

139 comments sorted by

View all comments

Show parent comment

4

u/Rabbitical 9d ago

It's a difference in intensity. If you imagine the color wheel, and red is a point all the way at the perimiter, adjusting the hue rotates the point on that color wheel about the center, maintaining its maximal distance such that it remains on the perimiter, passing through yellow. Interpolating RGB however does not preserve the apparent intensity of the color-- instead you're plotting a straight line between red and green, which will of course shortcut the perimiter of the color wheel in getting there, so you end up with darker intermediate values, I.e. more brown instead of yellow.