CMConvertRGBToHSVConverts colors specified in the RGB color space to equivalent colors defined in the HSV color space when the device types are the same.
pascal CMError CMConvertRGBToHSV ( const CMColor *src, CMColor *dst, unsigned long count);
- A pointer to an array containing the list of RGB colors to convert to HSV colors.
- A pointer to an array containing the list of colors, resulting from the conversion, as specified in the HSV color space.
- The number of colors to convert.
- function result
- A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
function converts one or more colors defined in the RGB color space to equivalent colors defined in the HSV color space. Both color spaces are device dependent.
If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the
dstparameters and allow the CMConvertRGBToHSV function to overwrite the source colors with the resulting converted color specifications.
SEE ALSOFor information about the color conversion routines in previous versions of ColorSync, see "Converting Between Color Spaces" (page 3-143).