Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reverse RGB
Message
From
06/06/2003 14:49:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Reverse RGB
Miscellaneous
Thread ID:
00797412
Message ID:
00797412
Views:
53
I need to do the reverse of this:
? Color2RGB(GetColor())


function Color2RGB
lparameters RGBcolor
* Color = 0x00bbggrr
return "rgb("+;
	ltrim(str(bitand(RGBColor,0x000000ff)))+","+ ;
	ltrim(str(bitrshift(bitand(RGBColor,0x0000ff00),8)))+","+ ;
	ltrim(str(bitrshift(bitand(RGBColor,0x00ff0000),16)))+")"
If I know the color is 212,208,200 on a form I need to return this color as it as it is stored in _screen.backcolor, etc. I'm braindead this afternoon, anyone willing to share a little function to do this?
TIA,TIA,TIA,TIA
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Next
Reply
Map
View

Click here to load this message in the networking platform