RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
GraphUtil.ColorRGBToHLS Function

Returns a converted color from RGB to HLS.

Pascal
procedure ColorRGBToHLS(clrRGB: TColorRef; var Hue: Word; var Luminance: Word; var Saturation: Word);
C++
ColorRGBToHLS(TColorRef clrRGB, Word Hue, Word Luminance, Word Saturation);

ColorRGBToHLS converts colors from RGB (Red, Green, Blue) to HLS/HBS (Hue, Lightness, Saturation/Hue, Brightness, Saturation).  

TColorRef represents the base color.  

Hue represents the hue.  

Luminance represents the luminance.  

Saturation represents the saturation.

Note: Hue, Luminance and Saturation are given by reference. The HLS value is stored in these three variables after the routine ends.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!