Represents an Allegro color.
Represents an Allegro color. It has methods for building colors out of RGB and HSV components and braking them down in those components again. There are unctions for converting between the RGB and HSV color spaces and for reading a color from a string. Also some of the most comonly used colors are available as static data members.
Examples of constructing a color:
Color c1(makecol(120, 240, 180));
Color c2(120, 240, 180);
Color c3(300.0, 140.0, 45.0));
Color c4(120, 240, 180, 200);
Color c5("120,240,180");
Examples:
clear_to_color(screen, Color::white);
rectfill(screen, 20, 30, 200, 150, Color(123, 234, 100));
Note: this doesn't work with 32 bit RGBA colors.
Alphabetic index Hierarchy of classes