libelemental 2.0.2
|
A color description. More...
#include <value.hh>
Public Member Functions | |
color (double red=0.0, double green=0.0, double blue=0.0) throw () | |
Constructs a new color with red, green, and blue percentages. | |
color (unsigned int red, unsigned int green, unsigned int blue) throw () | |
Constructs a new color with red, green, and blue levels. | |
double | get_luminance () const throw () |
Returns the luminous intensity of the color. | |
color | get_compliment () const throw () |
Returns a grayscale color complimentary in luminance to this color. | |
color | composite (const color &other, double alpha) const throw () |
Returns a composite of this color and another. | |
std::string | get_hex_spec () const throw () |
Returns a hexadecimal specification of the color ("#rrggbb" format). | |
Public Attributes | |
double | red |
The red component of the color in the RGB space. | |
double | green |
The green component of the color in the RGB space. | |
double | blue |
The blue component of the color in the RGB space. | |
A color description.
Its components are suitable as parameters to Gdk::Color::set_rgb_p().
Elemental::color::color | ( | unsigned int | red, |
unsigned int | green, | ||
unsigned int | blue | ||
) | |||
throw | ( | ||
) |
Constructs a new color with red, green, and blue levels.
Each component ranges from 0 (0.0) to 65535 (1.0).
Returns a composite of this color and another.
other | A color with which this color will be composited. |
alpha | The level of the other color in the composite, between 0.0 and 1.0. |