Contents

CMConvertRGBToHLS

Converts colors specified in the RGB color space to equivalent colors defined in the HLS color space.

Declaration

CMError CMConvertRGBToHLS (
   const CMColor *src,
   CMColor *dst,
   size_t count
);

Parameters

  • src:

    A pointer to an array containing the list of RGB colors to convert to HLS colors.

  • dst:

    A pointer to an array containing the list of colors, resulting from the conversion, as specified in the HLS color space.

  • count:

    The number of colors to convert.

Return Value

A CMError value. See Result Codes.

Overview

The CMConvertRGBToHLS function converts one or more colors defined in the RGB color space to equivalent colors defined in the HLS 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 src and dst parameters and allow the CMConvertRGBToHLS function to overwrite the source colors with the resulting converted color specifications.

See Also

Converting Colors