Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP & RGB Color Codes
Message
De
14/01/2000 06:07:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/01/2000 04:52:26
Upendra Nayak
Cadsys Technologies
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00318079
Message ID:
00318089
Vues:
26
>Dear UT User's
>
>I have observed that we get limited colors when we work with VFP. I you see web pages they are filled up with different shades and colors.
>
>Can any one tell me, where can i find list of different RGB Color codes.
>
>with regards


Upendra,
Yes in VFP it's limited to 256^3 colors but I don't know an internet page or app that uses more. Each component Red, Green, Blue have 256 different possible values. AFAIK VFP uses RGB schema that's same as used in internet pages with a hex notation.
You could use getcolor() and "define custom color" to choose from millions of color. You could convert that color to an RGB string with a simple code like :
* Returns numeric value of color as "RGB(cRed,cGreen,cBlue)"
function Color2RGB
lparameters nColor
return "RGB("+ ;
str(nColor%256,3)+","+;
str(floor(nColor%256^2 / 256),3)+","+;
str(floor(nColor / 256^2),3)+")"
For example you could check this :
lcColor = color2rgb(getcolor())
? lcColor && To see or use RGB() string
_screen.backcolor = eval(lcColor)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform