Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NumToRGB()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00185943
Message ID:
00185948
Views:
18
>How do you get a rgb string ("125,125,125") from a number.
>ex:
>myColor = RGB(100,100,0)
>myRGBString = NumToRGB(mycolor)
>How do I do this?
>-John S. Huddleston

John,

not my code, but we do it like this:

lnNew = GETCOLOR()
RGB3 = INT( lnNew/(256*256))
lnNew = lnNew - ( RGB3 * 256 * 256)
RGB2 = INT( lnNew/256)
lnNew = lnNew - ( RGB2 * 256)
RGB1 = lnNew

HTH
regards

Ian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform