(self, colors: List[Tuple[float, float, float]])
Sets the colors of the ring to the given list of triples.
Sets the colors of the ring to the given list of triples.
Sets the colors of the ring to the given list of triples .
def set_colors(self, colors: List[Tuple[float, float, float]]) -> None:
        """Sets the colors of the ring to the given list of triples."""
        if not self.initialized:
            return
        for led in range(self.LED_COUNT):
            dimmed_color = (self.brightness * val for val in colors[led])
            scaled_color = tuple(int(val * 255) for val in dimmed_color)
            self.controller.setPixelColorRGB(
                (self.LED_COUNT - led + self.LED_OFFSET) % self.LED_COUNT, *scaled_color
            )
        self.controller.show()
def set_colors ( self , colors : List [ Tuple [ float , float , float ] ] ) -> None : if not self . initialized : return for led in range ( self . LED_COUNT ) : dimmed_color = ( self . brightness * val for val in colors [ led ] ) scaled_color = tuple ( int ( val * 255 ) for val in dimmed_color ) self . controller . setPixelColorRGB ( ( self . LED_COUNT - led + self . LED_OFFSET ) % self . LED_COUNT , * scaled_color ) self . controller . show ( )