Some Notes on Color R uses a 24-bit color model. Colors are specified in 32-bit integers which are partitioned into 4 bytes as follows.
<-- most sig least sig --> +-------------------------------+ | 0 | blue | green | red | +-------------------------------+
The red, green and blue bytes can be extracted as follows.
red = ((color ) & 255) green = ((color >> 8) & 255) blue = ((color >> 16) & 255)
Changes as from 1.4.0: use top 8 bits as an alpha channel. 0 = opaque, 255 = transparent. Changes as from 2.0.0: use top 8 bits as full alpha channel 255 = opaque, 0 = transparent [to conform with SVG, PDF and others] and everything in between is used [which means that NA is not stored as an internal colour; it is converted to R_RGBA(255, 255, 255, 0)]