Update colorwheel from GRB to RGB.
This commit is contained in:
parent
6a5ab57c18
commit
37e5ff7757
@ -69,10 +69,10 @@ const int32_t colorwheel(float pos) {
|
||||
pos = pos - ((uint32_t)(pos / 256) * 256);
|
||||
}
|
||||
if (pos < 85)
|
||||
return (uint8_t)(pos * 3) << 16 | (uint8_t)(255 - (pos * 3)) << 8;
|
||||
return (uint8_t)(255 - (pos * 3)) << 16 | (uint8_t)(pos * 3);
|
||||
else if (pos < 170) {
|
||||
pos -= 85;
|
||||
return (uint8_t)(255 - (pos * 3)) << 16 | (uint8_t)(pos * 3);
|
||||
return (uint8_t)(pos * 3) << 16 | (uint8_t)(255 - (pos * 3)) << 8;
|
||||
} else {
|
||||
pos -= 170;
|
||||
return (uint8_t)(pos * 3) << 8 | (uint8_t)(255 - pos * 3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user