You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug in ColorFromPalette for CHSVPalette16 and CHSVPalette32 #602
The first parameter to scale8 in the backwards case should be equal to the abs(deltaHue) but as coded is equal to abs(deltaHue) - 1. As a result, the value of hue2 + 1 is never returned.
For a concrete example, imagine the two cases
hue1 = 0, hue2 = 10
deltaHue = 10
hue1 = 10, hue2 = 0
deltaHue = -10 (246)
In 1), the forward case, the first parameter to scale8 will be 10, returning values in the range 0 to 9 as desired.
In 2), the backwards case, the first parameter to scale8 will be 9 (255-246), returning values in the range 0 to 8, one short of desired.
Thanks for the clear bug report; I believe that the change that I just committed helps solve this problem. Please do let me know if it solves it for you, or if you're seeing further issues, and we'll reopen the ticket if needed. Thanks again.
Activity
focalintent commentedon May 7, 2018
@kriegsman - thoughts?
kriegsman commentedon May 7, 2018
Yep, I think this is a bug; I'll get on it.
kriegsman commentedon May 17, 2018
Thanks for the clear bug report; I believe that the change that I just committed helps solve this problem. Please do let me know if it solves it for you, or if you're seeing further issues, and we'll reopen the ticket if needed. Thanks again.
Correct an off-by-one bug in hue calculation, part II. Hopefully fixes …
Correct an off-by-one bug in hue calculation. Hopefully fixes FastLED…