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