Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kriegsman <kriegsman@users.noreply.github.com>2018-05-17 23:36:21 +0300
committerMark Kriegsman <kriegsman@users.noreply.github.com>2018-05-17 23:36:21 +0300
commitdbd2d8b8ca037f9d2d5e743785abac28b125c947 (patch)
tree23be148d11109eb6c5159e9cc2f91a21667ce310
parentade8254a26ffff43ba184266194b44c991003600 (diff)
Correct an off-by-one bug in hue calculation, part II. Hopefully fixes #602 the rest of the way.
-rw-r--r--colorutils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/colorutils.cpp b/colorutils.cpp
index 07d6be81..10d35924 100644
--- a/colorutils.cpp
+++ b/colorutils.cpp
@@ -1020,7 +1020,7 @@ CHSV ColorFromPalette( const struct CHSVPalette32& pal, uint8_t index, uint8_t b
uint8_t deltaHue = (uint8_t)(hue2 - hue1);
if( deltaHue & 0x80 ) {
// go backwards
- hue1 -= scale8( 255 - deltaHue, f2);
+ hue1 -= scale8( 256 - deltaHue, f2);
} else {
// go forwards
hue1 += scale8( deltaHue, f2);