We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a5ab57 commit 37e5ff7Copy full SHA for 37e5ff7
shared-bindings/_pixelbuf/__init__.c
@@ -69,10 +69,10 @@ const int32_t colorwheel(float pos) {
69
pos = pos - ((uint32_t)(pos / 256) * 256);
70
}
71
if (pos < 85)
72
- return (uint8_t)(pos * 3) << 16 | (uint8_t)(255 - (pos * 3)) << 8;
+ return (uint8_t)(255 - (pos * 3)) << 16 | (uint8_t)(pos * 3);
73
else if (pos < 170) {
74
pos -= 85;
75
- return (uint8_t)(255 - (pos * 3)) << 16 | (uint8_t)(pos * 3);
+ return (uint8_t)(pos * 3) << 16 | (uint8_t)(255 - (pos * 3)) << 8;
76
} else {
77
pos -= 170;
78
return (uint8_t)(pos * 3) << 8 | (uint8_t)(255 - pos * 3);
0 commit comments