Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reverse the RGB() function.
Message
From
14/04/1999 15:13:39
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00208339
Message ID:
00208340
Views:
27
This message has been marked as the solution to the initial question of the thread.
>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.

nRed=nColor%256
nGreen=int((nColor%65536)/256)
nBlue=int(nColor/65536)
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform