52 unsigned char red()
const {
66 unsigned char blue()
const {
83 void set(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
136 const char* objectid,
bool report,
bool& ok);
static RGBColor interpolate(const RGBColor &minColor, const RGBColor &maxColor, double weight)
Interpolates between two colors.
unsigned char myRed
The color amounts.
void setAlpha(unsigned char alpha)
Sets a new alpha value.
static const RGBColor WHITE
unsigned char red() const
Returns the red-amount of the color.
static const std::string DEFAULT_COLOR_STRING
The string description of the default color.
static const RGBColor BLUE
unsigned char alpha() const
Returns the alpha-amount of the color.
static const RGBColor GREY
static const RGBColor YELLOW
static const RGBColor INVISIBLE
static RGBColor parseColor(std::string coldef)
Parses a color information.
static RGBColor parseColorReporting(const std::string &coldef, const std::string &objecttype, const char *objectid, bool report, bool &ok)
Parses a color information.
unsigned char green() const
Returns the green-amount of the color.
static const RGBColor ORANGE
static const RGBColor CYAN
RGBColor invertedColor() const
obtain inverted of current RGBColor
static const RGBColor GREEN
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb....
unsigned char blue() const
Returns the blue-amount of the color.
friend std::ostream & operator<<(std::ostream &os, const RGBColor &col)
Writes the color to the given stream.
static std::mt19937 * getColorRNG()
static const RGBColor BLACK
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
bool operator!=(const RGBColor &c) const
void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
assigns new values
static const RGBColor MAGENTA
bool operator==(const RGBColor &c) const
static std::mt19937 myRNG
A random number generator to generate random colors independent of other randomness.
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
static const RGBColor RED
named colors
static RGBColor randomHue(double s=1, double v=1)
Return color with random hue.