Colord.ColorRGB¶
Methods¶
| class | array_interpolate(array, new_length) | 
| class | array_is_monotonic(array) | 
| class | array_new() | 
| class | new() | 
| copy(dest) | |
| dup() | |
| free() | |
| from_wavelength(wavelength) | |
| interpolate(p2, index, result) | |
| set(R, G, B) | |
| to_rgb8(dest) | 
Details¶
- 
class Colord.ColorRGB¶
- 
classmethod array_interpolate(array, new_length)[source]¶
- Parameters: - array ([Colord.ColorRGB]) – Input array
- new_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. 
- array ([
 - 
classmethod array_is_monotonic(array)[source]¶
- Parameters: - array ([ - Colord.ColorRGB]) – Input array- Returns: - Trueif the array is monotonic- Return type: - bool- Checks the array for monotonicity. - New in version 0.1.31. 
 - 
classmethod array_new()[source]¶
- Returns: - New array - Return type: - [ - Colord.ColorRGB]- Creates a new RGB array. - New in version 0.1.31. 
 - 
classmethod new()[source]¶
- Returns: - A newly allocated - Colord.ColorRGBobject- Return type: - Colord.ColorRGB- 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. 
 - 
dup()[source]¶
- Return type: - Colord.ColorRGB- 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. 
- p2 (
 - 
to_rgb8(dest)[source]¶
- Parameters: - dest ( - Colord.ColorRGB8) – the destination color- Convert from one color format to another. - New in version 0.1.27. 
 
- 
classmethod