35
rated 0 times
[
38]
[
3]
/ answers: 1 / hits: 24628
/ 13 Years ago, mon, december 12, 2011, 12:00:00
How do I convert a RGB colour value to just plain decimal?
So I have: RGB(255,255,255) is white
Its decimal equivalent is: 16777215
I have tried thinking it might just be:
var dec = r*g*b; // but this doesn't work
Although that doesn't work.
Anyone know of the algorithm/equation to convert from RGB (or rgba) to decimal?
More From » c++