def __init__(self, *args, **kwargs):
_list.__init__(self)<EOL>self.name = "<STR_LIT>"<EOL>self.tags = []<EOL>for arg in args:<EOL><INDENT>if arg.__class__ == Color:<EOL><INDENT>self.append(arg)<EOL><DEDENT>if arg.__class__ == BaseColor:<EOL><INDENT>self.append(color(arg.r, arg.g, arg.b, mode="<STR_LIT>"))<EOL><DEDENT>try:<EOL><INDENT>self.name = arg.label<EOL>for r, g, b in arg:<EOL><INDENT>self.append(color(r, g, b, mode="<STR_LIT>"))<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>if isinstance(arg, _list)or isinstance(arg, tuple):<EOL><INDENT>for clr in arg:<EOL><INDENT>if clr.__class__ == Color:<EOL><INDENT>self.append(clr)<EOL><DEDENT>if clr.__class__ == BaseColor:<EOL><INDENT>self.append(color(clr))<EOL><DEDENT><DEDENT><DEDENT>if isinstance(arg, (str, unicode)):<EOL><INDENT>if os.path.exists(arg):<EOL><INDENT>n = <NUM_LIT:10><EOL>if "<STR_LIT:n>" in kwargs.keys(): n = kwargs["<STR_LIT:n>"]<EOL>self.image_to_rgb(arg, n)<EOL><DEDENT>else:<EOL><INDENT>clr = Color(arg)<EOL>if not clr.is_transparent:<EOL><INDENT>self.append(clr)<EOL>self.name = arg<EOL><DEDENT>else:<EOL><INDENT>self.extend(self.context_to_rgb(arg))<EOL>self.tags = arg<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if "<STR_LIT:name>" in kwargs.keys():<EOL><INDENT>self.name = kwargs["<STR_LIT:name>"]<EOL><DEDENT>if "<STR_LIT>" in kwargs.keys():<EOL><INDENT>self.tags = kwargs["<STR_LIT>"]<EOL><DEDENT>
Construct a list of colors.

Colors can be supplied as individual arguments,
or in a list or tuple:
ColorList(clr1, clr2)
ColorList([clr1, clr2])
ColorList((clr1, clr2))

You can also supply an object from inside a
web.kuler.search() or web.colr.search() list.

Or a string with a named color, a descriptive feel,
or the pathname of an image.

ColorList furthermore takes two named parameters,
a name and a list of tags.