def set_color(self, color):
if len(color) is 3: color += [self.color_range]
previous_color = self.color
self.color = ColorRGBA(color[0]/self.color_range, color[1]/self.color_range, color[2]/self.color_range, color[3]/self.color_range)
if self.color != previous_color and self._on : self._send_color_cmd(self.color)
评论列表
文章目录