Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reverse the RGB() function.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00208339
Message ID:
00208481
Vues:
29
>Okay doesn't ask why, we just need to do it. We want to take a color value and return the 3 color numbers that the RGB()function uses.
>
> rgb(255,200,100) returns 6605055
> We want to pass 6605055 to a function and get 255,200,100 returned.
>
>Thanx.

Fred,

As an alternative, there's a funtion in FoxTools that does just that:
RGBComp( nRGBColor, @nRedVal, @nGreenVal, @nBlueVal )
nRGBColor

Specifies a composite RGB color value ranging from 0 to 16777215.

@nRedVal

Specifies a reference to a variable in which the function returns the intensity of the red color component of nRGBColor.

@nGreenVal

Specifies a reference to a variable in which the function returns the intensity of the green color component of nRGBColor.

@nBlueVal

Specifies a reference to a variable in which the function returns the intensity of the blue color component of nRGBColor.

José
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform