Click to See Complete Forum and Search --> : Color shining


udipr
April 18th, 2001, 02:05 AM
Hello

I made form with option to change color with CommonDialog (.ShowColor).

After the user press OK I get the color from: CommonDialog.Color property.

Is any body know how can I get the Shining of that color. (the number that represented by Lum in the CommonDialog) ???

Thanks for any help.

shree
April 18th, 2001, 09:44 AM
Use the ColorRGBToHLS() API function to convert your RGB value into HLS.

If this function is not available to you, but are familiar with C, the MSDN contains a source code for the conversion. Search for "RGB to HLS" (without the quotes) in MSDN and you'll get it. You can either put this code in a DLL and call it from your VB program or convert the code to VB.