Top | ![]() |
![]() |
![]() |
![]() |
GimpColorSpaceGimpColorSpace — Utility functions which convert colors between different color models. |
void | gimp_rgb_to_hsv () |
void | gimp_rgb_to_hsl () |
void | gimp_rgb_to_cmyk () |
void | gimp_hsv_to_rgb () |
void | gimp_hsl_to_rgb () |
void | gimp_cmyk_to_rgb () |
When programming pixel data manipulation functions you will often use algorithms operating on a color model different from the one GIMP uses. This file provides utility functions to convert colors between different color spaces.
void gimp_rgb_to_hsv (const GimpRGB *rgb
,GimpHSV *hsv
);
Does a conversion from RGB to HSV (Hue, Saturation, Value) colorspace.
void gimp_rgb_to_hsl (const GimpRGB *rgb
,GimpHSL *hsl
);
Convert an RGB color value to a HSL (Hue, Saturation, Lightness) color value.
void gimp_rgb_to_cmyk (const GimpRGB *rgb
,gdouble pullout
,GimpCMYK *cmyk
);
Does a naive conversion from RGB to CMYK colorspace. A simple
formula that doesn't take any color-profiles into account is used.
The amount of black pullout how can be controlled via the pullout
parameter. A pullout
value of 0 makes this a conversion to CMY.
A value of 1 causes the maximum amount of black to be pulled out.
void gimp_hsv_to_rgb (const GimpHSV *hsv
,GimpRGB *rgb
);
Converts a color value from HSV to RGB colorspace
void gimp_hsl_to_rgb (const GimpHSL *hsl
,GimpRGB *rgb
);
Convert a HSL color value to an RGB color value.