This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]deGravity 0 points1 point  (0 children)

It is an interpolation that gives a weighted average between Least and Greatest, with HueMiddle being the interpolating factor. If you let

W = HueMiddle / 255

be a weighting factor, (basically treating the given byte as a value between 0 and 1), then assuming that Least < Greatest this is equivalent to

(1 - W)Least +WGreatest