Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp color codes to html color codes conversions
Message
From
20/08/2002 12:38:54
 
 
To
20/08/2002 12:35:24
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00691505
Message ID:
00691531
Views:
14
Alex,

Incredible..

Than you,

Neil
>>Hi,
>>
>>I have a vfp desk top app that allows users to pick the color of the captions on their command buttons and store thenm in a table. I have a web interface to the table and would like to have the button captions to be displayed in the colors they picked in their desktop interface to the table. But vfp red = 255 and html red is #ff0000. How do you convert vfp color codes to html color codes?
>>
>>Neil
>
>Hi Neil,
>
>Use the following function to convert RGB values to HTML color codes.
>
>
Function RGB2HTMLColor( tnRGB)
>	Local lnRed, lnGreen, lnBlue
>	lnRed = Mod( m.tnRGB, 256)
>	lnGreen = Mod( Int( m.tnRGB/256), 256)
>	lnBlue = Mod( Int( m.tnRGB/65536), 256)
>
>	Return "#" + ;
>		Right( Transform( m.lnRed, "@0"), 2) + ;
>		Right( Transform( m.lnGreen, "@0"), 2) + ;
>		Right( Transform( m.lnBlue, "@0"), 2)
>EndFunc
>
>HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform