ColorUtils: Handle cases where hue is -1 in linearInterpolate
When a color has a saturation of 0 the hue is undefined. QColor expresses this by returning -1 for the hue of those colors. When that happens, just naively interpolating that results in incorrect colors. So instead account for this case by either using the other color's hue or if both are -1, just using 0. Additionally, since we're using floats in the calculations here, use the various float-based getters/setters instead of relying on implicit conversions.
parent
c1bcb6b3
-
mentioned in commit 7a9dcc8b
-
mentioned in merge request !1008 (merged)
-
mentioned in commit b515bac6
-
mentioned in commit fa090a8d
Please register or sign in to comment