Functions¶
Details¶
- Colord.color_get_blackbody_rgb(temp, result)[source]¶
- Parameters:
temp (
int
) – the temperature in Kelvinresult (
Colord.ColorRGB
) – the destination color
- Returns:
True
if temp was in range and the result accurate- Return type:
Get the blackbody color for a specific temperature. If the temperature range is outside 1000K to 10000K then the result is clipped.
New in version 0.1.26.
- Colord.color_get_blackbody_rgb_full(temp, result, flags)[source]¶
- Parameters:
temp (
float
) – the temperature in Kelvinresult (
Colord.ColorRGB
) – the destination colorflags (
Colord.ColorBlackbodyFlags
) – someColord.ColorBlackbodyFlags
, e.g.Colord.ColorBlackbodyFlags.USE_PLANCKIAN
- Returns:
True
if temp was in range and the result accurate- Return type:
Get the blackbody color for a specific temperature. If the temperature range is outside 1000K to 10000K then the result is clipped.
New in version 1.3.5.
- Colord.color_rgb8_to_rgb(src, dest)[source]¶
- Parameters:
src (
Colord.ColorRGB8
) – the source colordest (
Colord.ColorRGB
) – the destination color
Convert from one color format to another.
New in version 0.1.27.
- Colord.color_rgb_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.
- Colord.color_rgb_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.
- Colord.color_rgb_array_new()[source]¶
- Returns:
New array
- Return type:
Creates a new RGB array.
New in version 0.1.31.
- Colord.colorspace_to_string(colorspace)[source]¶
- Parameters:
colorspace (
Colord.Colorspace
) –- Return type:
- Colord.mat33_clear(src)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the source
Clears a matrix value, setting all it’s values to zero.
- Colord.mat33_copy(src, dest)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the sourcedest (
Colord.Mat3x3
) – the destination
Copies the matrix. The arguments src and dest cannot be the same value.
- Colord.mat33_determinant(src)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the source- Return type:
Gets the determinant of the matrix.
- Colord.mat33_get_data(src)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the matrix source- Returns:
the pointer to the data segment.
- Return type:
Gets the raw data for the matrix.
- Colord.mat33_init(dest, m00, m01, m02, m10, m11, m12, m20, m21, m22)[source]¶
- Parameters:
dest (
Colord.Mat3x3
) – the destination matrixm00 (
float
) – component valuem01 (
float
) – component valuem02 (
float
) – component valuem10 (
float
) – component valuem11 (
float
) – component valuem12 (
float
) – component valuem20 (
float
) – component valuem21 (
float
) – component valuem22 (
float
) – component value
Initialises a matrix.
- Colord.mat33_is_finite(mat)[source]¶
- Parameters:
mat (
Colord.Mat3x3
) – the matrix to test- Raises:
- Returns:
- Return type:
Determine whether all entries in the specified matrix are finite and not NaNs.
- Colord.mat33_matrix_multiply(mat_src1, mat_src2, mat_dest)[source]¶
- Parameters:
mat_src1 (
Colord.Mat3x3
) – the matrix sourcemat_src2 (
Colord.Mat3x3
) – the other matrix sourcemat_dest (
Colord.Mat3x3
) – the destination
Multiply (convolve) one matrix with another. The arguments mat_src1 cannot be the same as mat_dest, and mat_src2 cannot be the same as mat_dest.
- Colord.mat33_normalize(src, dest)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the source matrixdest (
Colord.Mat3x3
) – the destination matrix
Normalizes a matrix
The arguments src and dest can be the same value.
- Colord.mat33_reciprocal(src, dest)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the sourcedest (
Colord.Mat3x3
) – the destination
- Returns:
False
if det is zero (singular).- Return type:
Inverts the matrix. The arguments src and dest cannot be the same value.
- Colord.mat33_scalar_multiply(mat_src, value, mat_dest)[source]¶
- Parameters:
mat_src (
Colord.Mat3x3
) – the sourcevalue (
float
) – the scalarmat_dest (
Colord.Mat3x3
) – the destination
Multiplies a matrix with a scalar. The arguments vec_src and vec_dest can be the same value.
- Colord.mat33_set_identity(src)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the source
Sets the matrix to an identity value.
- Colord.mat33_to_string(src)[source]¶
- Parameters:
src (
Colord.Mat3x3
) – the source- Returns:
the string. Free with
GLib.free
()- Return type:
Obtains a string representaton of a matrix.
- Colord.mat33_vector_multiply(mat_src, vec_src, vec_dest)[source]¶
- Parameters:
mat_src (
Colord.Mat3x3
) – the matrix sourcevec_src (
Colord.Vec3
) – the vector sourcevec_dest (
Colord.Vec3
) – the destination vector
Multiplies a matrix with a vector. The arguments vec_src and vec_dest cannot be the same value.
- Colord.object_scope_from_string(object_scope)[source]¶
- Parameters:
object_scope (
str
) –- Return type:
- Colord.object_scope_to_string(object_scope)[source]¶
- Parameters:
object_scope (
Colord.ObjectScope
) –- Return type:
- Colord.rendering_intent_from_string(rendering_intent)[source]¶
- Parameters:
rendering_intent (
str
) –- Return type:
- Colord.rendering_intent_to_string(rendering_intent)[source]¶
- Parameters:
rendering_intent (
Colord.RenderingIntent
) –- Return type:
- Colord.standard_space_from_string(standard_space)[source]¶
- Parameters:
standard_space (
str
) – the standard colorspace, e.g. ‘srgb’.- Returns:
- Return type:
Gets the standard colorspace as a enumerated value.
- Colord.standard_space_to_string(standard_space)[source]¶
- Parameters:
standard_space (
Colord.StandardSpace
) – aColord.StandardSpace
- Returns:
the standard colorspace, e.g. ‘srgb’.
- Return type:
Gets the standard colorspace as a string.