Information générale
Catégorie:
Codage, syntaxe et commandes
Upendra,
You can use the GetColor() function to allow you to select the colour/shade you are specifically interested in. You can then use the RGBComp() function in FOXTOOLS.FLL to split the returned value into its component channels. The exact shade or colour available is also dependent on your PC's display adaptor and the colour depth its capable of displaying, for example:
LOCAL lnColour && This can be 0 to 16777215 or -1 for error/cancel.
LOCAL lnRed
LOCAL lnGreen
LOCAL lnBlue
LOCAL llReturnValue
set library to foxtools additive
lnColour = getcolor()
if lnColour = -1
? "Colour selection cancelled by user."
else
? "The getcolor() function returned: " + alltrim(str(lnColour))
llReturnValue = RGBComp(lnColour, @lnRed, @lnGreen, @lnBlue)
if llReturnValue = .T.
? "Red Component: " + alltrim(str(lnRed))
? "Green Component: " + alltrim(str(lnGreen))
? "Blue Component: " + alltrim(str(lnBlue))
else
? "RGBComp() function returned an error"
endif
endif
You can also use a package such as Adobe Photoshop/Corel Photopaint to look up RGB colours more accurately using Pantone swatches or RAL.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement