Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RGB(r,g,b) == x
Message
From
27/11/2001 08:33:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00586236
Message ID:
00586239
Views:
13
>Greetings my friends. :)
>
>One more of those tiny easy questions:
>
>?RGB(150,120,0) returns 30870. No problem.
>
>But, how can I get the RGB components from 30870?

30870 = 0*256^2 + 120*256+150.

To do the calculations the other way around, use a combination of the modulos operator (%) and int().

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform