Colors

Summary
An ALLEGRO_COLOR structure describes a color in a device independant way.

Types

ALLEGRO_COLOR

An ALLEGRO_COLOR structure describes a color in a device independant way.  Use al_map_rgb et. al. and al_unmap_rgb et. al. to translate from and to various color representations.

ALLEGRO_COLOR al_map_rgb(unsigned char r,
unsigned char g,
unsigned char b)
Convert r, g, b (ranging from 0-255) into an ALLEGRO_COLOR, using 255 for alpha.
void al_unmap_rgb(ALLEGRO_COLOR color,
unsigned char *r,
unsigned char *g,
unsigned char *b)
Retrieves components of an ALLEGRO_COLOR, ignoring alpha Components will range from 0-255.