Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RGB
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: RGB
Miscellaneous
Thread ID:
00345771
Message ID:
00345781
Views:
17
>RGB() takes a RED,GREEN,BLUE color componenets and converts to a unique color number. Is there a way to take the unique color number and convert to a RED,GREEN,BLUE color componenet ?

Ron,

You can either do the math or bit mask it (Red's in the most significant 8 bits, green in the middle, and blue in the least significant 8 bits) or, my preference, use the foxtools function RGBComp(). Here's the syntax once the library is loaded:
* lncolor is combined color
STORE 0 TO lnred, lngreen, lnblue
= RGBComp(lncolor, @lnred, @lngreen, @lnblue)
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform