$(U Color) is a simple color class composed of 4 components:
Red
Green
Blue
Alpha (opacity)
Each component is a public member, an unsigned integer in the range [0, 255].
Thus, colors can be constructed and manipulated very easily:
autocolor = Color(255, 0, 0); // redcolor.r = 0; // make it blackcolor.b = 128; // make it dark blue
$(PARA The fourth component of colors, named "alpha", represents the opacity
of the color. A color with an alpha value of 255 will be fully opaque, while
an alpha value of 0 will make a color fully transparent, whatever the value
of the other components is.
The most common colors are already defined as static variables:)
$(U Color) is a simple color class composed of 4 components:
Each component is a public member, an unsigned integer in the range [0, 255]. Thus, colors can be constructed and manipulated very easily:
$(PARA The fourth component of colors, named "alpha", represents the opacity of the color. A color with an alpha value of 255 will be fully opaque, while an alpha value of 0 will make a color fully transparent, whatever the value of the other components is. The most common colors are already defined as static variables:)
$(PARA Colors can also be added and modulated (multiplied) using the overloaded operators `+` and `*`.)