Skip to content

Commit 863951f

Browse files
authored
Merge pull request #36 from Neradoc/fix-color-packet-by-int
Fix creating a color packet with an int
2 parents 1562e88 + 7aa578e commit 863951f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_bluefruit_connect/color_packet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, color):
3434
or an int color value ``0xRRGGBB``
3535
"""
3636
if isinstance(color, int):
37-
self._color = tuple(color.to_bytes("BBB", "big"))
37+
self._color = tuple(color.to_bytes(3, "big"))
3838
elif len(color) == 3 and all(0 <= c <= 255 for c in color):
3939
self._color = color
4040
else:

0 commit comments

Comments
 (0)