RGB
ColorRGB
Red, Green, Blue - Color Object.
Create a new RGB color.
| PARAMETER | DESCRIPTION |
|---|---|
r
|
The red color value (
TYPE:
|
g
|
The green color value (
TYPE:
|
b
|
The blue color value (
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If |
ValueError
|
If |
copy
copy() -> ColorRGB
Create a copy of this color.
| RETURNS | DESCRIPTION |
|---|---|
ColorRGB
|
An exact replica of this color. |
from_iterable
classmethod
from_iterable(
iterable: Union[
ColorRGB,
tuple[int, int, int],
list[int],
NDArray[numpy.uint8],
],
) -> ColorRGB
Create a new RGB color from an iterable object.
| PARAMETER | DESCRIPTION |
|---|---|
iterable
|
The iterable object to create the color from.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If RGB values are not |
ValueError
|
|
normalized
to_numpy
ColorRGBA
Bases: ColorRGB
Red, Green, Blue, Alpha - Color Object.
Create a new RGBA color.
| PARAMETER | DESCRIPTION |
|---|---|
r
|
The red color value (
TYPE:
|
g
|
The green color value (
TYPE:
|
b
|
The blue color value (
TYPE:
|
a
|
The alpha/transparency value (
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
|
ValueError
|
|
copy
copy() -> ColorRGBA
Create a copy of this color.
| RETURNS | DESCRIPTION |
|---|---|
ColorRGBA
|
An exact replica of this color. |
from_iterable
classmethod
from_iterable(
iterable: Union[
ColorRGBA,
tuple[int, int, int, float],
list[int, float],
NDArray[Union[numpy.uint8, numpy.float16]],
],
) -> ColorRGBA
Create a new RGBA color from an iterable object.
| PARAMETER | DESCRIPTION |
|---|---|
iterable
|
The iterable object to create the color from.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
|
ValueError
|
|