(self, pixelsize)
Convert to pixel (list of 3-4 values)
Convert to pixel (list of 3-4 values)
Convert to pixel ( list of 3 - 4 values )
def to_pixel(self, pixelsize):
        """
        Convert to pixel (list of 3-4 values)
        """
        assert pixelsize in (3,4), "Color.to_pixel only supports 3 and 4 value pixels"
        if pixelsize == 3:
            return _mixin_alpha([self.red, self.green, self.blue], self.alpha)
        else:
            return [self.red, self.green, self.blue, self.alpha]
def to_pixel ( self , pixelsize ) : assert pixelsize in ( 3 , 4 ) , "Color.to_pixel only supports 3 and 4 value pixels" if pixelsize == 3 : return _mixin_alpha ( [ self . red , self . green , self . blue ] , self . alpha ) else : return [ self . red , self . green , self . blue , self . alpha ]