Skip to content

Commit a4c6325

Browse files
authoredDec 27, 2023
Update rgb.py
fixing an issue when 4 values are returned instead of r/g/b
1 parent 7ecfffe commit a4c6325

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎adafruit_rgb_display/rgb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def color565(
5656
package namespace."""
5757
if isinstance(r, (tuple, list)): # see if the first var is a tuple/list
5858
if len(r) >= 3:
59-
red, g, b = r
59+
red, g, b = r[0:3]
6060
else:
6161
raise ValueError(
6262
"Not enough values to unpack (expected 3, got %d)" % len(r)

0 commit comments

Comments
 (0)