Skip to content

Commit

Permalink
Merge pull request #119 from reza-n/patch-1
Browse files Browse the repository at this point in the history
catch only the r/g/b values when list is longer
  • Loading branch information
FoamyGuy authored Feb 20, 2024
2 parents 7ecfffe + a4c6325 commit c545d3a
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 c545d3a

Please sign in to comment.