def color_list(s):
    """Convert a list of RGB components to a list of triples.
       Example: the string '255,127,0:127,127,127:0,0,255' is converted
       to [(255,127,0), (127,127,127), (0,0,255)]."""
    return (map(int,rgb.split(',')) for rgb in s.split(':'))