from_rgba method

from_rgba

Returns a new Color with the requested ged, green, blue, alpha values. All color components must be in the range 0-255.

Returns

A new instance of the Color class

def from_rgba(self, red, green, blue, alpha):
    ...
ParameterTypeDescription
redbyteA byte that represents the red component of the color.
greenbyteA byte that represents the green component of the color.
bluebyteA byte that represents the blue component of the color.
alphabyteA byte that represents the alpha component of the color.

from_rgba

Returns a new Color with the requested ged, green, blue, alpha values. All color components must be in the range 0-255.

Returns

A new instance of the Color class

def from_rgba(self, red, green, blue, alpha):
    ...
ParameterTypeDescription
redintA int that represents the red component of the color.
greenintA int that represents the green component of the color.
blueintA int that represents the blue component of the color.
alphaintA int that represents the alpha component of the color.

from_rgba

Returns a new Color with the requested ged, green, blue, alpha values. All color components must be in the range 0-1.

Returns

A new instance of the Color class

def from_rgba(self, red, green, blue, alpha):
    ...
ParameterTypeDescription
redfloatA float that represents the red component of the color.
greenfloatA float that represents the green component of the color.
bluefloatA float that represents the blue component of the color.
alphafloatA float that represents the alpha component of the color.

See Also