diff --git a/adafruit_pypixelbuf.py b/adafruit_pypixelbuf.py index 833638d..1d88663 100644 --- a/adafruit_pypixelbuf.py +++ b/adafruit_pypixelbuf.py @@ -95,6 +95,11 @@ def __init__(self, n, buf, byteorder="BGR", brightness=1.0, # pylint: disable=t for i in range(0, self._pixels * 4, 4): self._bytearray[i + self._offset] = DOTSTAR_LED_START_FULL_BRIGHT + @property + def buf(self): + """The brightness adjusted pixel buffer data.""" + return bytearray([int(i * self.brightness) for i in self._bytearray]) + @staticmethod def parse_byteorder(byteorder): """