29.2 ARGB colors

An ARGB color is a RGB color extended with alpha transparency information. This notation is useful for the functions of the drawing library because they allow you to specify an ARGB color. Hence, you can draw transparent graphics primitives with the Hollywood drawing library.

A standard RGB color is a 24-bit value whereas an ARGB color uses 32 bits. The highest 8 bits are used for the alpha transparency information which can range from 0 to 255. Thus, an ARGB color looks like the following:

 
$AARRGGBB

An alpha value of 0 means that there is no transparency at all. A value of 255 means full transparency. This is an inversion of the format used in SetAlphaIntensity() where 255 means 0% transparency and 0 means 100% transparency. Please keep that in mind.

You can use the ARGB() function to easily combine an alpha transparency value with a 24-bit RGB color.


Show TOC