Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get Hue/Sat/Lum
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00523566
Message ID:
00523583
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform