"""Solid color animation — all LEDs the same color at all times.""" from lightsync.animations.base import AnimationBase class SolidColorAnimation(AnimationBase): """Time-independent: all LEDs show a single solid color.""" def __init__( self, color: tuple[int, int, int] = (255, 255, 255), white: int = 0, ) -> None: self.color = tuple(color) # type: ignore[arg-type] self.white = white def render(self, t: float, led_count: int) -> list[tuple]: return [self.color] * led_count @classmethod def from_params(cls, params: dict) -> "SolidColorAnimation": color = tuple(params.get("color", [255, 255, 255])) white = params.get("white", 0) return cls(color=color, white=white) # type: ignore[arg-type]