diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index e16f1bcf4..6b54ceaf6 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -310,7 +310,7 @@ static inline uint32_t lv_color_to32(lv_color_t color) * valueto = ( valuefrom * multiplier + adder ) >> divisor * multiplier = FLOOR( ( (2^bitsto - 1) << divisor ) / (float)(2^bitsfrom - 1) ) * - * Find the smallest divisor where min and max valuefrom convert. + * Find the first divisor where ( adder >> divisor ) > 0 * * 5-bit to 8-bit: ( 31 * multiplier + adder ) >> divisor = 255 * divisor multiplier adder min (0) max (31)