Functions¶
Details¶
- 
Colord.color_get_blackbody_rgb(temp, result)[source]¶
- Parameters: - temp (int) – the temperature in Kelvin
- result (Colord.ColorRGB) – the destination color
 - Returns: - Trueif 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. 
- temp (
- 
Colord.color_get_blackbody_rgb_full(temp, result, flags)[source]¶
- Parameters: - temp (float) – the temperature in Kelvin
- result (Colord.ColorRGB) – the destination color
- flags (Colord.ColorBlackbodyFlags) – someColord.ColorBlackbodyFlags, e.g.Colord.ColorBlackbodyFlags.USE_PLANCKIAN
 - Returns: - Trueif 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. 
- temp (
- 
Colord.color_rgb8_to_rgb(src, dest)[source]¶
- Parameters: - src (Colord.ColorRGB8) – the source color
- dest (Colord.ColorRGB) – the destination color
 - Convert from one color format to another. - New in version 0.1.27. 
- src (
- 
Colord.color_rgb_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 ([
- 
Colord.color_rgb_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. 
- 
Colord.color_rgb_array_new()[source]¶
- Returns: - New array - Return type: - [ - Colord.ColorRGB]- Creates a new RGB array. - New in version 0.1.31. 
- 
Colord.colorspace_from_string(colorspace)[source]¶
- Parameters: - colorspace ( - str) –- Return type: - Colord.Colorspace
- 
Colord.colorspace_to_string(colorspace)[source]¶
- Parameters: - colorspace ( - Colord.Colorspace) –- Return type: - str
- 
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 source
- dest (Colord.Mat3x3) – the destination
 - Copies the matrix. The arguments src and dest cannot be the same value. 
- src (
- 
Colord.mat33_determinant(src)[source]¶
- Parameters: - src ( - Colord.Mat3x3) – the source- Return type: - float- 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: - float- 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 matrix
- m00 (float) – component value
- m01 (float) – component value
- m02 (float) – component value
- m10 (float) – component value
- m11 (float) – component value
- m12 (float) – component value
- m20 (float) – component value
- m21 (float) – component value
- m22 (float) – component value
 - Initialises a matrix. 
- dest (
- 
Colord.mat33_is_finite(mat)[source]¶
- Parameters: - mat ( - Colord.Mat3x3) – the matrix to test- Raises: - GLib.Error- Returns: - Trueif isfinite() returns- Truefor all values.- Return type: - bool- 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 source
- mat_src2 (Colord.Mat3x3) – the other matrix source
- mat_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. 
- mat_src1 (
- 
Colord.mat33_normalize(src, dest)[source]¶
- Parameters: - src (Colord.Mat3x3) – the source matrix
- dest (Colord.Mat3x3) – the destination matrix
 - Normalizes a matrix - The arguments src and dest can be the same value. 
- src (
- 
Colord.mat33_reciprocal(src, dest)[source]¶
- Parameters: - src (Colord.Mat3x3) – the source
- dest (Colord.Mat3x3) – the destination
 - Returns: - Falseif det is zero (singular).- Return type: - Inverts the matrix. The arguments src and dest cannot be the same value. 
- src (
- 
Colord.mat33_scalar_multiply(mat_src, value, mat_dest)[source]¶
- Parameters: - mat_src (Colord.Mat3x3) – the source
- value (float) – the scalar
- mat_dest (Colord.Mat3x3) – the destination
 - Multiplies a matrix with a scalar. The arguments vec_src and vec_dest can be the same value. 
- mat_src (
- 
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: - str- 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 source
- vec_src (Colord.Vec3) – the vector source
- vec_dest (Colord.Vec3) – the destination vector
 - Multiplies a matrix with a vector. The arguments vec_src and vec_dest cannot be the same value. 
- mat_src (
- 
Colord.object_scope_from_string(object_scope)[source]¶
- Parameters: - object_scope ( - str) –- Return type: - Colord.ObjectScope
- 
Colord.object_scope_to_string(object_scope)[source]¶
- Parameters: - object_scope ( - Colord.ObjectScope) –- Return type: - str
- 
Colord.pixel_format_from_string(pixel_format)[source]¶
- Parameters: - pixel_format ( - str) –- Return type: - int
- 
Colord.pixel_format_to_string(pixel_format)[source]¶
- Parameters: - pixel_format ( - int) –- Return type: - str
- 
Colord.rendering_intent_from_string(rendering_intent)[source]¶
- Parameters: - rendering_intent ( - str) –- Return type: - Colord.RenderingIntent
- 
Colord.rendering_intent_to_string(rendering_intent)[source]¶
- Parameters: - rendering_intent ( - Colord.RenderingIntent) –- Return type: - str
- 
Colord.standard_space_from_string(standard_space)[source]¶
- Parameters: - standard_space ( - str) – the standard colorspace, e.g. ‘srgb’.- Returns: - a - Colord.StandardSpace- Return type: - Colord.StandardSpace- Gets the standard colorspace as a enumerated value. 
- 
Colord.standard_space_to_string(standard_space)[source]¶
- Parameters: - standard_space ( - Colord.StandardSpace) – a- Colord.StandardSpace- Returns: - the standard colorspace, e.g. ‘srgb’. - Return type: - str- Gets the standard colorspace as a string.