Color computation reference

I’m putting this as reference. This one I found is from one of Andrea’s presentation.


color = alpha

The reverse way:


alpha = color >> 24 & 0xff
red = color >> 16 & 0xff
green = color >> 8 & 0xff
blue = color & 0xff

Comment are closed.