Skip to content

Commit

Permalink
Update rgb.py
Browse files Browse the repository at this point in the history
fixing an issue when 4 values are returned instead of r/g/b
  • Loading branch information
reza-n authored Dec 27, 2023
1 parent 7ecfffe commit a4c6325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_rgb_display/rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def color565(
package namespace."""
if isinstance(r, (tuple, list)): # see if the first var is a tuple/list
if len(r) >= 3:
red, g, b = r
red, g, b = r[0:3]
else:
raise ValueError(
"Not enough values to unpack (expected 3, got %d)" % len(r)
Expand Down

0 comments on commit a4c6325

Please sign in to comment.