Fix bug in hsv2rgb transform

This commit is contained in:
johan 2013-09-13 14:03:12 +02:00
parent 94a8dfad2f
commit 02fa8f5679

View File

@ -103,7 +103,7 @@ void HsvTransform::hsv2rgb(uint16_t hue, uint8_t saturation, uint8_t value, uint
}
region = hue / 60;
remainder = (hue - (region * 60)) * 6;
remainder = (hue - (region * 60)) * 256 / 60;
p = (value * (255 - saturation)) >> 8;
q = (value * (255 - ((saturation * remainder) >> 8))) >> 8;