Public Member Functions | |
MyColor () | |
Default constructor. | |
MyColor (unsigned int _R, unsigned int _G, unsigned int _B) | |
string | printHTML () const |
string | printRGB () const |
Static Public Member Functions | |
static MyColor | generate (string id) |
Public Attributes | |
unsigned int | R |
unsigned int | G |
unsigned int | B |
string | RGB |
string | RGBHTML |
string | blank |
Graphwhiz::MyColor::MyColor | ( | unsigned int | _R, |
unsigned int | _G, | ||
unsigned int | _B | ||
) | [inline] |
Constructor that takes a specific set of R, G, B values.
MyColor Graphwhiz::MyColor::generate | ( | string | id | ) | [static] |
Generate a colour for id.
The method creates a "hash" value (an integer) from id. To create the three components of the colour, the method takes the modulus of the id with three prime numbers close to 255.