Functions

color_get_blackbody_rgb (temp, result)

color_get_blackbody_rgb_full (temp, result, flags)

color_rgb8_to_rgb (src, dest)

color_rgb_array_interpolate (array, new_length)

color_rgb_array_is_monotonic (array)

color_rgb_array_new ()

colorspace_from_string (colorspace)

colorspace_to_string (colorspace)

mat33_clear (src)

mat33_copy (src, dest)

mat33_determinant (src)

mat33_get_data (src)

mat33_init (dest, m00, m01, m02, m10, m11, m12, m20, m21, m22)

mat33_is_finite (mat)

mat33_matrix_multiply (mat_src1, mat_src2, mat_dest)

mat33_normalize (src, dest)

mat33_reciprocal (src, dest)

mat33_scalar_multiply (mat_src, value, mat_dest)

mat33_set_identity (src)

mat33_to_string (src)

mat33_vector_multiply (mat_src, vec_src, vec_dest)

object_scope_from_string (object_scope)

object_scope_to_string (object_scope)

pixel_format_from_string (pixel_format)

pixel_format_to_string (pixel_format)

rendering_intent_from_string (rendering_intent)

rendering_intent_to_string (rendering_intent)

standard_space_from_string (standard_space)

standard_space_to_string (standard_space)

Details

Colord.color_get_blackbody_rgb(temp, result)[source]
Parameters:
  • temp (int) – the temperature in Kelvin

  • result (Colord.ColorRGB) – the destination color

Returns:

True if temp was in range and the result accurate

Return type:

bool

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:
Returns:

True if temp was in range and the result accurate

Return type:

bool

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:

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 array

  • new_length (int) – the target length of the return array

Returns:

An array of size new_length or None

Return type:

[Colord.ColorRGB]

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:

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:

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:

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.

Colord.mat33_is_finite(mat)[source]
Parameters:

mat (Colord.Mat3x3) – the matrix to test

Raises:

GLib.Error

Returns:

True if isfinite() returns True for 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:

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:

Normalizes a matrix

The arguments src and dest can be the same value.

Colord.mat33_reciprocal(src, dest)[source]
Parameters:
Returns:

False if det is zero (singular).

Return type:

bool

Inverts the matrix. The arguments src and dest cannot be the same value.

Colord.mat33_scalar_multiply(mat_src, value, mat_dest)[source]
Parameters:

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:

str

Obtains a string representaton of a matrix.

Colord.mat33_vector_multiply(mat_src, vec_src, vec_dest)[source]
Parameters:

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.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.