Is there any way specifying a color out of the whole spectrum with a single value instead of RGB (eg. HEX FFFFFF)? I need to give a different color to each value out of a data base. Also vice versa I need to get the data base value out of the color.
single value color specification
Blitz3D Forums/Blitz3D Beginners Area/single value color specification Just set the blue component. If memory serves it's something like colour = (blue Or (green Shl 8) Or (red Shl 16)... I could be wrong though!
Thanks alot but the right order for RGB to Integer conversation is: value = R + G Shl 8 + B Shl 16, I think.
More interesting is the Integer to RGB conversation. How could I solve it?
More interesting is the Integer to RGB conversation. How could I solve it?
Thanks! It seams, that helps.
In the early days it was also possibe to use a 24 bit value in the blue parameter of several commands, eg:
EntityColor m,0,0,rgb
This was overwriting the red and green channels. Not sure if this is still working tho.
EntityColor m,0,0,rgb
This was overwriting the red and green channels. Not sure if this is still working tho.