Color constructor

init

Initializes a new instance of the Color class. By default color is black.

def __init__(self):
    ...

init

Initializes a new instance of the Color class. All color components must be in the range 0-1.

def __init__(self, red, green, blue):
    ...
ParameterTypeDescription
redfloatThe red component of the color.
greenfloatThe green component of the color.
bluefloatThe blue component of the color.

init

Initializes a new instance of the Color class. All color components must be in the range 0-255.

def __init__(self, red, green, blue):
    ...
ParameterTypeDescription
redbyteThe red component of the color.
greenbyteThe green component of the color.
bluebyteThe blue component of the color.

init

Initializes a new instance of the Color class. All color components must be in the range 0-255.

def __init__(self, red, green, blue):
    ...
ParameterTypeDescription
redintThe red component of the color.
greenintThe green component of the color.
blueintThe blue component of the color.

init

Initializes a new instance of the Color class. All color components must be in the range 0-1.

def __init__(self, red, green, blue, alpha):
    ...
ParameterTypeDescription
redfloatThe red component of the color.
greenfloatThe green component of the color.
bluefloatThe blue component of the color.
alphafloatThe alpha component of the color.

init

Initializes a new instance of the Color class. All color components must be in the range 0-255.

def __init__(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.

init

Initializes a new instance of the Color class. All color components must be in the range 0-255.

def __init__(self, red, green, blue, alpha):
    ...
ParameterTypeDescription
redintThe red component of the color.
greenintThe green component of the color.
blueintThe blue component of the color.
alphaintThe alpha component of the color.

See Also