Colord.ColorRGB¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
B |
r/w |
||
G |
r/w |
||
R |
r/w |
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Colord.ColorRGB¶
- classmethod array_interpolate(array, new_length)[source]¶
- Parameters:
array ([
Colord.ColorRGB
]) – Input arraynew_length (
int
) – the target length of the return array
- Returns:
An array of size new_length or
None
- Return type:
Interpolate the RGB array to a different size. This uses the Akima interpolation algorithm unless the array would become non-monotonic, in which case it falls back to linear interpolation.
New in version 0.1.31.
- classmethod array_is_monotonic(array)[source]¶
- Parameters:
array ([
Colord.ColorRGB
]) – Input array- Returns:
True
if the array is monotonic- Return type:
Checks the array for monotonicity.
New in version 0.1.31.
- classmethod array_new()[source]¶
- Returns:
New array
- Return type:
Creates a new RGB array.
New in version 0.1.31.
- classmethod new()[source]¶
- Returns:
A newly allocated
Colord.ColorRGB
object- Return type:
Allocates a color value.
New in version 0.1.0.
- copy(dest)[source]¶
- Parameters:
dest (
Colord.ColorRGB
) – the destination color
Deep copies a color value.
New in version 0.1.27.
- from_wavelength(wavelength)[source]¶
- Parameters:
wavelength (
float
) – the wavelength roughly between 380nm and 780nm
Set an RGB color which is roughly representative to the wavelength.
New in version 1.3.4.
- interpolate(p2, index, result)[source]¶
- Parameters:
p2 (
Colord.ColorRGB
) –index (
float
) –result (
Colord.ColorRGB
) –
New in version 0.1.26.
- to_rgb8(dest)[source]¶
- Parameters:
dest (
Colord.ColorRGB8
) – the destination color
Convert from one color format to another.
New in version 0.1.27.