68 unsigned char red()
const {
82 unsigned char blue()
const {
99 void set(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
140 const char* objectid,
bool report,
bool& ok);
static const RGBColor BLUE
static RGBColor parseColor(std::string coldef)
Parses a color information.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb.
static const RGBColor WHITE
static RGBColor parseColorReporting(const std::string &coldef, const std::string &objecttype, const char *objectid, bool report, bool &ok)
Parses a color information.
unsigned char alpha() const
Returns the alpha-amount of the color.
static const RGBColor ORANGE
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 const RGBColor BLACK
bool operator==(const RGBColor &c) const
RGBColor invertedColor() const
obtain inverted of current RGBColor
bool operator!=(const RGBColor &c) const
static const RGBColor GREEN
static const RGBColor GREY
unsigned char myRed
The color amounts.
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
static const RGBColor MAGENTA
static const RGBColor YELLOW
static const RGBColor RED
named colors
static const RGBColor CYAN
unsigned char green() const
Returns the green-amount of the color.
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 std::string DEFAULT_COLOR_STRING
The string description of the default color.