class EE::System::Color

Overview

#include <color.hpp>

class Color: public EE::System::tColor {
public:
    // fields

    static const Color Transparent;
    static const Color Black;
    static const Color Silver;
    static const Color Gray;
    static const Color White;
    static const Color Maroon;
    static const Color Red;
    static const Color Purple;
    static const Color Fuchsia;
    static const Color Green;
    static const Color Lime;
    static const Color Olive;
    static const Color Yellow;
    static const Color Navy;
    static const Color Blue;
    static const Color Teal;
    static const Color Aqua;
    static const Color aliceblue;
    static const Color antiquewhite;
    static const Color aqua;
    static const Color aquamarine;
    static const Color azure;
    static const Color beige;
    static const Color bisque;
    static const Color black;
    static const Color blanchedalmond;
    static const Color blue;
    static const Color blueviolet;
    static const Color brown;
    static const Color burlywood;
    static const Color cadetblue;
    static const Color chartreuse;
    static const Color chocolate;
    static const Color coral;
    static const Color cornflowerblue;
    static const Color cornsilk;
    static const Color crimson;
    static const Color cyan;
    static const Color darkblue;
    static const Color darkcyan;
    static const Color darkgoldenrod;
    static const Color darkgray;
    static const Color darkgreen;
    static const Color darkgrey;
    static const Color darkkhaki;
    static const Color darkmagenta;
    static const Color darkolivegreen;
    static const Color darkorange;
    static const Color darkorchid;
    static const Color darkred;
    static const Color darksalmon;
    static const Color darkseagreen;
    static const Color darkslateblue;
    static const Color darkslategray;
    static const Color darkslategrey;
    static const Color darkturquoise;
    static const Color darkviolet;
    static const Color deeppink;
    static const Color deepskyblue;
    static const Color dimgray;
    static const Color dimgrey;
    static const Color dodgerblue;
    static const Color firebrick;
    static const Color floralwhite;
    static const Color forestgreen;
    static const Color fuchsia;
    static const Color gainsboro;
    static const Color ghostwhite;
    static const Color gold;
    static const Color goldenrod;
    static const Color gray;
    static const Color green;
    static const Color greenyellow;
    static const Color grey;
    static const Color honeydew;
    static const Color hotpink;
    static const Color indianred;
    static const Color indigo;
    static const Color ivory;
    static const Color khaki;
    static const Color lavender;
    static const Color lavenderblush;
    static const Color lawngreen;
    static const Color lemonchiffon;
    static const Color lightblue;
    static const Color lightcoral;
    static const Color lightcyan;
    static const Color lightgoldenrodyellow;
    static const Color lightgray;
    static const Color lightgreen;
    static const Color lightgrey;
    static const Color lightpink;
    static const Color lightsalmon;
    static const Color lightseagreen;
    static const Color lightskyblue;
    static const Color lightslategray;
    static const Color lightslategrey;
    static const Color lightsteelblue;
    static const Color lightyellow;
    static const Color lime;
    static const Color limegreen;
    static const Color linen;
    static const Color magenta;
    static const Color maroon;
    static const Color mediumaquamarine;
    static const Color mediumblue;
    static const Color mediumorchid;
    static const Color mediumpurple;
    static const Color mediumseagreen;
    static const Color mediumslateblue;
    static const Color mediumspringgreen;
    static const Color mediumturquoise;
    static const Color mediumvioletred;
    static const Color midnightblue;
    static const Color mintcream;
    static const Color mistyrose;
    static const Color moccasin;
    static const Color navajowhite;
    static const Color navy;
    static const Color oldlace;
    static const Color olive;
    static const Color olivedrab;
    static const Color orange;
    static const Color orangered;
    static const Color orchid;
    static const Color palegoldenrod;
    static const Color palegreen;
    static const Color paleturquoise;
    static const Color palevioletred;
    static const Color papayawhip;
    static const Color peachpuff;
    static const Color peru;
    static const Color pink;
    static const Color plum;
    static const Color powderblue;
    static const Color purple;
    static const Color red;
    static const Color rosybrown;
    static const Color royalblue;
    static const Color saddlebrown;
    static const Color salmon;
    static const Color sandybrown;
    static const Color seagreen;
    static const Color seashell;
    static const Color sienna;
    static const Color silver;
    static const Color skyblue;
    static const Color slateblue;
    static const Color slategray;
    static const Color slategrey;
    static const Color snow;
    static const Color springgreen;
    static const Color steelblue;
    static const Color tan;
    static const Color teal;
    static const Color thistle;
    static const Color tomato;
    static const Color turquoise;
    static const Color violet;
    static const Color wheat;
    static const Color white;
    static const Color whitesmoke;
    static const Color yellow;
    static const Color yellowgreen;

    // construction

    Color();
    Color(const Color& color);
    Color(const std::string& colorString);
    Color(Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255);
    Color(const tRGB<Uint8>& Col);
    Color(const tRGB<Uint8>& Col, Uint8 a);
    Color(const tColor<Uint8>& Col, Uint8 a);
    Color(const tColor<Uint8>& Col);
    Color(const Uint32& Col);

    // methods

    Color& operator=(const Color& col);
    Colorf toHsv() const;
    Colorf toHsl() const;
    Color clone() const;
    Color invert() const;
    Color div(int divisor, bool divAlpha = false);
    std::string toHexString(const bool& prependHash = true) const;
    std::string toRgbaString() const;
    std::string toRgbString() const;
    Color& blendAlpha(const Uint8& alpha);
    static Color fromHsv(const Colorf& hsv);
    static Color fromHsl(const Colorf& hsl);
    static ColorAf blend(ColorAf srcf, ColorAf dstf);
    static Color blend(Color src, Color dst);
    static Color fromPointer(void* ptr);
    static Color fromString(const char* str);
    static Color fromString(std::string str);
    static bool isColorString(std::string str);
    static void registerColor(const std::string& name, const Color& color);
    static bool unregisterColor(const std::string& name);
    static bool validHexColorString(const std::string& hexColor);
};

Inherited Members

public:
    // fields

    Uint32 Value;
    T r;
    T g;
    T b;
    T a;
    T h;
    T s;
    T v;
    struct EE::System::tColor::@4::@8 hsv;
    T l;
    struct EE::System::tColor::@4::@9 hsl;

    // methods

    Uint32 getValue() const;
    void assign(T r, T g, T b, T a);
    void assign(const tColor<T>& Col);
    bool operator==(const tColor<T>& Col) const;
    bool operator!=(const tColor<T>& Col) const;
    tColor<T> operator+(const tColor<T>& Col) const;
    tColor<T> operator-(const tColor<T>& Col) const;
    tColor<T> operator*(const tColor<T>& Col) const;
    tRGB<T> toRGB();

Detailed Documentation

Methods

static ColorAf blend(ColorAf srcf, ColorAf dstf)

Blend a source color to destination color

static Color blend(Color src, Color dst)

Blend a source color to destination color