from_rgb method

from_rgb(r, g, b)

Creates an opaque color (alpha is 255) from the specified red, green and blue values.

Returns

The color created from the specified values.

@staticmethod
def from_rgb(r, g, b):
    ...
ParameterTypeDescription
rintThe red component value. Valid values are 0 through 255.
gintThe green component value. Valid values are 0 through 255.
bintThe blue component value. Valid values are 0 through 255.

Exceptions

ExceptionDescription
ValueErrorA component value is less than 0 or greater than 255.

See Also