Correct bitmask for third color (blue) scaling. (#2817)

This commit is contained in:
Dave T 2021-11-28 19:12:40 +00:00 committed by Jesse Hills
parent 50ec1d0445
commit e55506f9db
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -42,7 +42,7 @@ class ColorUtil {
? esp_scale(((colorcode >> third_bits) & ((1 << second_bits) - 1)), ((1 << second_bits) - 1)) ? esp_scale(((colorcode >> third_bits) & ((1 << second_bits) - 1)), ((1 << second_bits) - 1))
: esp_scale(((colorcode >> 8) & 0xFF), ((1 << second_bits) - 1)); : esp_scale(((colorcode >> 8) & 0xFF), ((1 << second_bits) - 1));
third_color = (right_bit_aligned ? esp_scale(((colorcode >> 0) & 0xFF), ((1 << third_bits) - 1)) third_color = (right_bit_aligned ? esp_scale(((colorcode >> 0) & ((1 << third_bits) - 1)), ((1 << third_bits) - 1))
: esp_scale(((colorcode >> 0) & 0xFF), (1 << third_bits) - 1)); : esp_scale(((colorcode >> 0) & 0xFF), (1 << third_bits) - 1));
Color color_return; Color color_return;