Top |
const gchar *
cd_color_swatch_get_name (const CdColorSwatch *swatch
);
Since: 0.1.32
const CdColorLab *
cd_color_swatch_get_value (const CdColorSwatch *swatch
);
Since: 0.1.32
CdColorSwatch *
cd_color_swatch_new (void
);
Allocates a color value.
Since: 0.1.32
void
cd_color_xyz_free (CdColorXYZ *src
);
Deallocates a color value.
Since: 0.1.0
void
cd_color_rgb_free (CdColorRGB *src
);
Deallocates a color value.
Since: 0.1.0
void
cd_color_lab_free (CdColorLab *src
);
Deallocates a color value.
Since: 0.1.32
void
cd_color_yxy_free (CdColorYxy *src
);
Deallocates a color value.
Since: 0.1.0
void
cd_color_uvw_free (CdColorUVW *src
);
Deallocates a color value.
Since: 1.1.6
void
cd_color_swatch_free (CdColorSwatch *src
);
Deallocates a color swatch.
Since: 0.1.32
CdColorSwatch *
cd_color_swatch_dup (const CdColorSwatch *src
);
Since: 0.1.32
void cd_color_xyz_set (CdColorXYZ *dest
,gdouble X
,gdouble Y
,gdouble Z
);
Initialises a color value.
Since: 0.1.27
void cd_color_rgb_set (CdColorRGB *dest
,gdouble R
,gdouble G
,gdouble B
);
Initialises a color value.
Since: 0.1.27
void cd_color_lab_set (CdColorLab *dest
,gdouble L
,gdouble a
,gdouble b
);
Initialises a color value.
Since: 0.1.32
void cd_color_yxy_set (CdColorYxy *dest
,gdouble Y
,gdouble x
,gdouble y
);
Initialises a color value.
Since: 0.1.27
void cd_color_uvw_set (CdColorUVW *dest
,gdouble U
,gdouble V
,gdouble W
);
Initialises a color value.
Since: 1.1.6
void cd_color_swatch_set_name (CdColorSwatch *dest
,const gchar *name
);
Initialises a swatch name.
Since: 0.1.32
void cd_color_swatch_set_value (CdColorSwatch *dest
,const CdColorLab *value
);
Initialises a swatch value.
Since: 0.1.32
void cd_color_xyz_copy (const CdColorXYZ *src
,CdColorXYZ *dest
);
Deep copies a color value.
Since: 0.1.27
void cd_color_yxy_copy (const CdColorYxy *src
,CdColorYxy *dest
);
Deep copies a color value.
Since: 0.1.27
void cd_color_uvw_copy (const CdColorUVW *src
,CdColorUVW *dest
);
Deep copies a color value.
Since: 1.1.6
void cd_color_lab_copy (const CdColorLab *src
,CdColorLab *dest
);
Deep copies a color value.
Since: 0.1.32
gdouble cd_color_lab_delta_e76 (const CdColorLab *p1
,const CdColorLab *p2
);
Calculates the ΔE of two colors using the 1976 formula.
Since: 0.1.32
void
cd_color_xyz_clear (CdColorXYZ *dest
);
Initialises a color value.
Since: 0.1.27
void cd_color_rgb_copy (const CdColorRGB *src
,CdColorRGB *dest
);
Deep copies a color value.
Since: 0.1.27
void cd_color_rgb8_to_rgb (const CdColorRGB8 *src
,CdColorRGB *dest
);
Convert from one color format to another.
Since: 0.1.27
void cd_color_rgb_to_rgb8 (const CdColorRGB *src
,CdColorRGB8 *dest
);
Convert from one color format to another.
Since: 0.1.27
void cd_color_yxy_to_xyz (const CdColorYxy *src
,CdColorXYZ *dest
);
Convert from one color format to another.
Since: 0.1.27
void cd_color_xyz_to_yxy (const CdColorXYZ *src
,CdColorYxy *dest
);
Convert from one color format to another.
Since: 0.1.27
void cd_color_xyz_to_uvw (const CdColorXYZ *src
,const CdColorXYZ *whitepoint
,CdColorUVW *dest
);
Convert from one color format to another.
Since: 1.1.6
void cd_color_yxy_to_uvw (const CdColorYxy *src
,CdColorUVW *dest
);
Convert from one color format to another.
Since: 1.1.6
void cd_color_uvw_set_planckian_locus (CdColorUVW *dest
,gdouble temp
);
Sets the CIEUVW color from a Planckian locus of specific temperature.
Since: 1.1.6
gdouble cd_color_uvw_get_chroma_difference (const CdColorUVW *p1
,const CdColorUVW *p2
);
Gets the chromaticity distance in the CIE 1960 UCS.
Since: 1.1.6
gboolean cd_color_get_blackbody_rgb (guint temp
,CdColorRGB *result
);
Get the blackbody color for a specific temperature. If the temperature range is outside 1000K to 10000K then the result is clipped.
Since: 0.1.26
gboolean cd_color_get_blackbody_rgb_full (gdouble temp
,CdColorRGB *result
,CdColorBlackbodyFlags flags
);
Get the blackbody color for a specific temperature. If the temperature range is outside 1000K to 10000K then the result is clipped.
temp |
the temperature in Kelvin |
|
result |
the destination color |
|
flags |
some CdColorBlackbodyFlags, e.g. |
Since: 1.3.5
void cd_color_rgb_interpolate (const CdColorRGB *p1
,const CdColorRGB *p2
,gdouble index
,CdColorRGB *result
);
Since: 0.1.26
void cd_color_rgb_from_wavelength (CdColorRGB *dest
,gdouble wavelength
);
Set an RGB color which is roughly representative to the wavelength.
dest |
a CdColorRGB for the RGB result |
|
wavelength |
the wavelength roughly between 380nm and 780nm |
Since: 1.3.4
gdouble
cd_color_xyz_to_cct (const CdColorXYZ *src
);
Gets the correlated color temperature for the XYZ value.
Since: 1.1.6
void cd_color_xyz_normalize (const CdColorXYZ *src
,gdouble max
,CdColorXYZ *dest
);
Normalizes src
to y=1.0
Since: 1.1.6
GPtrArray *
cd_color_rgb_array_new (void
);
Creates a new RGB array.
Since: 0.1.31
gboolean
cd_color_rgb_array_is_monotonic (const GPtrArray *array
);
Checks the array for monotonicity.
Since: 0.1.31
GPtrArray * cd_color_rgb_array_interpolate (const GPtrArray *array
,guint new_length
);
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.
array |
Input array. |
[element-type CdColorRGB] |
new_length |
the target length of the return array |
Since: 0.1.31