Return color 32bit value from rgb?

sitajony

Active Member
Licensed User
Hi, tonight I'm searching for return a 32bit value (Ex:-5464123) from a RGB splited code (R. G. B)
I tried some different calcul but unable to find the best calcul...
Anyone can help me?
Thanks for your replies!
 

derez

Expert
Licensed User
Longtime User
The help : " Returns the number that represents a certain color.
Syntax: RGB (R, G, B) "
I don't know if this is the representation that you want.
 

mjcoon

Well-Known Member
Licensed User
I tried but it doesn't work

That's a bit vague; in what way does it not work? (If there's a better way to annoy a support person than just saying "it does not work" I do not know what it might be!)

I wanted to use seven colours from the electronic component number sequence (brown, red, orange, yellow, green, blue, purple) but found that the Basic4PPC "cBrown" was not brown enough. So I chose my own, and my array is set up as follows. (It works OK for me!)

B4X:
trackColours() = Array(Rgb(128, 64, 0), cRed, cOrange, cYellow, cGreen, cBlue, cPurple)

Mike.
 

sitajony

Active Member
Licensed User
Sorry, in fact I confused between "rvb()" who mean "Rouge, Vert, Bleu" and "rgb()" who mean "Red, Green, Blue" and as I'm french I used rvb() function, so it's normal that it didn't work...
Thanks again for your replies!
 
Top