Skip to content

Commit 37e5ff7

Browse files
committed
Update colorwheel from GRB to RGB.
1 parent 6a5ab57 commit 37e5ff7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared-bindings/_pixelbuf/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ const int32_t colorwheel(float pos) {
6969
pos = pos - ((uint32_t)(pos / 256) * 256);
7070
}
7171
if (pos < 85)
72-
return (uint8_t)(pos * 3) << 16 | (uint8_t)(255 - (pos * 3)) << 8;
72+
return (uint8_t)(255 - (pos * 3)) << 16 | (uint8_t)(pos * 3);
7373
else if (pos < 170) {
7474
pos -= 85;
75-
return (uint8_t)(255 - (pos * 3)) << 16 | (uint8_t)(pos * 3);
75+
return (uint8_t)(pos * 3) << 16 | (uint8_t)(255 - (pos * 3)) << 8;
7676
} else {
7777
pos -= 170;
7878
return (uint8_t)(pos * 3) << 8 | (uint8_t)(255 - pos * 3);

0 commit comments

Comments
 (0)