Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting HTML color to number
Message
From
06/01/1998 07:18:36
 
 
To
06/01/1998 00:17:01
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00069534
Message ID:
00069771
Views:
36
>>One of my control used in a Web browser is having some color parameters. However, as oppose to standard HTML where we can specify CCCCCC as a color, for example, we need to specify something like -2147483643. Can someone tell what is the formula to convert something like that to its number equivalent?
>>
>>We have something like that in Visual FoxPro I believe for some properties. Is this the same that applies here?
>
>Your CCCCCC is in fact a RGB color in hex in the format: RRGGBB where each letter is a HEX digit. In VFP you can write the same thing as 0xCCCCCC.
>
>For example, if your HTML color is F3147D, in VFP you will have 0xF3147D. You can also write the following:
>
>lnColor = 0xF3147D
>?lnColor
>
>This will print the equivalent number in decimal. Ie: no conversion is necessary. Just write the hex number prefixed by 0x.

Thanks, I'll try that.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform