diff --git a/adafruit_dotstar.py b/adafruit_dotstar.py index 1a3555b..27e5977 100755 --- a/adafruit_dotstar.py +++ b/adafruit_dotstar.py @@ -157,7 +157,7 @@ def _set_item(self, index, value): if isinstance(value, int): rgb = (value >> 16, (value >> 8) & 0xff, value & 0xff) - if len(value) == 4: + if len(rgb) == 4: brightness = value[3] # Ignore value[3] below. else: