Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert Integer into RGB color pairs
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00717572
Message ID:
00717590
Views:
16
This message has been marked as the solution to the initial question of the thread.
Try this:

lnRed = BITAND(lnIntegerColor, 255)
lnGreen = BITRSHIFT(BITAND(lnIntegerColor, 256^2 - 1), 8)
lnBlue = BITRSHIFT(BITAND(lnIntegerColor, 256^3 - 1), 16)

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform