(self, color: Tuple[float, float, float])
Sets the color of the strip to the given rgb triple.
Sets the color of the strip to the given rgb triple.
Sets the color of the strip to the given rgb triple .
def set_color(self, color: Tuple[float, float, float]) -> None:
        """Sets the color of the strip to the given rgb triple."""
        if not self.initialized:
            return

        for channel, val in enumerate(color):
            # map the value to the interval [0, 4095]
            dimmed_val = val * self.brightness
            scaled_val = round(dimmed_val * 4095)
            self.controller.set_pwm(channel, 0, scaled_val)
def set_color ( self , color : Tuple [ float , float , float ] ) -> None : if not self . initialized : return for channel , val in enumerate ( color ) : # map the value to the interval [0, 4095] dimmed_val = val * self . brightness scaled_val = round ( dimmed_val * 4095 ) self . controller . set_pwm ( channel , 0 , scaled_val )