def set_color(self, rgb):
target = '<STR_LIT:U+002C>'.join([str(c) for c in rgb])<EOL>self.set_service_value(<EOL>self.color_service,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>target)<EOL>rgbi = self.get_color_index(['<STR_LIT:R>', '<STR_LIT>', '<STR_LIT:B>'])<EOL>if rgbi is None:<EOL><INDENT>return<EOL><DEDENT>target = ('<STR_LIT>' +<EOL>str(rgbi[<NUM_LIT:0>]) + '<STR_LIT:=>' + str(rgb[<NUM_LIT:0>]) + '<STR_LIT:U+002C>' +<EOL>str(rgbi[<NUM_LIT:1>]) + '<STR_LIT:=>' + str(rgb[<NUM_LIT:1>]) + '<STR_LIT:U+002C>' +<EOL>str(rgbi[<NUM_LIT:2>]) + '<STR_LIT:=>' + str(rgb[<NUM_LIT:2>]))<EOL>self.set_cache_complex_value("<STR_LIT>", target)<EOL>
Set dimmer color.