(self, items)
Creates the palette backed by the given list. The list must contain
        RGBA quadruplets or color names, which will be resolved first by
        L{color_name_to_rgba()}. Anything that is understood by
        L{color_name_to_rgba()} is OK here.
Creates the palette backed by the given list. The list must contain
        RGBA quadruplets or color names, which will be resolved first by
        L{color_name_to_rgba()}. Anything that is understood by
        L{color_name_to_rgba()} is OK here.
Creates the palette backed by the given list . The list must contain RGBA quadruplets or color names which will be resolved first by L { color_name_to_rgba () } . Anything that is understood by L { color_name_to_rgba () } is OK here .
def __init__(self, items):
        """Creates the palette backed by the given list. The list must contain
        RGBA quadruplets or color names, which will be resolved first by
        L{color_name_to_rgba()}. Anything that is understood by
        L{color_name_to_rgba()} is OK here."""
        Palette.__init__(self, len(items))
        for idx, color in enumerate(items):
            if isinstance(color, str):
                color = color_name_to_rgba(color)
            self._cache[idx] = color
def __init__ ( self , items ) : Palette . __init__ ( self , len ( items ) ) for idx , color in enumerate ( items ) : if isinstance ( color , str ) : color = color_name_to_rgba ( color ) self . _cache [ idx ] = color