Skip to main content

ints_to_rgba

Converts integer or string values for RGB color and an optional alpha value to an RGBA object.

def ints_to_rgba(
r: int | str,
g: int | str,
b: int | str,
alpha: float | None = None
) - > RGBA

Converts integer or string values for RGB color and an optional alpha value to an RGBA object.

Parameters

NameTypeDescription
r`intstr`
g`intstr`
b`intstr`
alpha`floatNone` = None

Returns

TypeDescription
RGBAAn instance of the RGBA class with the corresponding color and alpha values.