Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get Hue/Sat/Lum
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00523566
Message ID:
00523583
Views:
9
For starters... you can take a look at the following Windows API routines via the MSDN Library. It sounds like you want to use ColorRGBToHLS. In my code below, I have an example of retrieving the system 3D Color via GetSysColor, and then getting the hue/sat/lum of that color.

DECLARE INTEGER ColorRGBToHLS IN ShlWapi INTEGER lnBackColor, ;
INTEGER @lnHue, INTEGER @lnLuminance, INTEGER @lnSaturation
DECLARE INTEGER GetSysColor IN User32 INTEGER

LOCAL ln3DColor, lnHue, lnLuminance, lnSaturation

STORE 0 TO lnHue, lnLuminance, lnSaturation

*-- Get system 3D Color.
ln3DColor = GetSysColor(COLOR_BTNFACE)

*-- Get the HLS values.
= ColorRGBToHLS(ln3DColor, ;
@lnHue, @lnLuminance, @lnSaturation)

>Hi!
>
>How would I set get the Hue/Sat/Lum of the RGB() colors...
>
>Please help...

Doug Stalter

"According to the proverb, the best things are the most difficult." -Plutarch
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform