Convert colors from RGB to hue-luminance-saturation (HLS) format.

Use ColorRGBToHLS. Function signature is as follows: [sourcecode language=’cpp’]VOID ColorRGBToHLS( COLORREF clrRGB, WORD *pwHue, WORD *pwLuminance, WORD *pwSaturation );[/sourcecode] Now you should be knowing how to use it. Link to shlwapi.lib, include shlwapi.h. You must have IE version 5 and above.
Continue reading…

 

Convert colors from hue-luminance-saturation (HLS) to RGB format

Use ColorHLSToRGB. Function signature is as follows… [sourcecode language=’cpp’]COLORREF ColorHLSToRGB( WORD wHue,    WORD wLuminance,     WORD wSaturation );[/sourcecode] Returns RGB value. Link to shlwapi.lib. Include file shlwapi.h. You must have atleast internet explorer version 5.
Continue reading…