CColors



Helper class designed to be used statically. It stores information about predefined colors and allow to convert between different color spaces as well as enumerate over standard or non-standard colors. Controls which manage color lists use it to build color lists.

You can find more information in comments below.

class CColors
{
public:
    // Standart colors
    static const CColor Black;
    static const CColor Maroon;
    static const CColor Green;
    static const CColor Olive;
    static const CColor Navy;
    static const CColor Purple;
    static const CColor Teal;
    static const CColor Gray;
    static const CColor Silver;
    static const CColor Red;
    static const CColor Lime;
    static const CColor Yellow;
    static const CColor Blue;
    static const CColor Fuchsia;
    static const CColor Aqua;
    static const CColor White;
    // None color
    static const CColor None;
    // Extended colors
    static const CColor AliceBlue;
    static const CColor AntiqueWhite;
    static const CColor Aquamarine;
    static const CColor Azure;
    static const CColor Beige;
    static const CColor Bisque;
    static const CColor BlanchedAlmond;
    static const CColor BlueViolet;
    static const CColor Brown;
    static const CColor BurlyWood;
    static const CColor CadetBlue;
    static const CColor Chartreuse;
    static const CColor Chocolate;
    static const CColor Coral;
    static const CColor CornflowerBlue;
    static const CColor Cornsilk;
    static const CColor Crimson;
    static const CColor Cyan;
    static const CColor DarkBlue;
    static const CColor DarkCyan;
    static const CColor DarkGoldenRod;
    static const CColor DarkGray;
    static const CColor DarkGreen;
    static const CColor DarkKhaki;
    static const CColor DarkMagenta;
    static const CColor DarkOliveGreen;
    static const CColor DarkOrange;
    static const CColor DarkOrchid;
    static const CColor DarkRed;
    static const CColor DarkSalmon;
    static const CColor DarkSeaGreen;
    static const CColor DarkSlateBlue;
    static const CColor DarkSlateGray;
    static const CColor DarkTurquoise;
    static const CColor DarkViolet;
    static const CColor DeepPink;
    static const CColor DeepSkyBlue;
    static const CColor DimGray;
    static const CColor DodgerBlue;
    static const CColor FireBrick;
    static const CColor FloralWhite;
    static const CColor ForestGreen;
    static const CColor Gainsboro;
    static const CColor GhostWhite;
    static const CColor Gold;
    static const CColor GoldenRod;
    static const CColor GreenYellow;
    static const CColor HoneyDew;
    static const CColor HotPink;
    static const CColor IndianRed;
    static const CColor Indigo;
    static const CColor Ivory;
    static const CColor Khaki;
    static const CColor Lavender;
    static const CColor LavenderBlush;
    static const CColor LawnGreen;
    static const CColor LemonChiffon;
    static const CColor LightBlue;
    static const CColor LightCoral;
    static const CColor LightCyan;
    static const CColor LightGoldenRodYellow;
    static const CColor LightGray;
    static const CColor LightGreen;
    static const CColor LightPink;
    static const CColor LightSalmon;
    static const CColor LightSeaGreen;
    static const CColor LightSkyBlue;
    static const CColor LightSlateGray;
    static const CColor LightSteelBlue;
    static const CColor LightYellow;
    static const CColor LimeGreen;
    static const CColor Linen;
    static const CColor Magenta;
    static const CColor MediumAquaMarine;
    static const CColor MediumBlue;
    static const CColor MediumOrchid;
    static const CColor MediumPurple;
    static const CColor MediumSeaGreen;
    static const CColor MediumSlateBlue;
    static const CColor MediumSpringGreen;
    static const CColor MediumTurquoise;
    static const CColor MediumVioletRed;
    static const CColor MidnightBlue;
    static const CColor MintCream;
    static const CColor MistyRose;
    static const CColor Moccasin;
    static const CColor NavajoWhite;
    static const CColor OldLace;
    static const CColor OliveDrab;
    static const CColor Orange;
    static const CColor OrangeRed;
    static const CColor Orchid;
    static const CColor PaleGoldenRod;
    static const CColor PaleGreen;
    static const CColor PaleTurquoise;
    static const CColor PaleVioletRed;
    static const CColor PapayaWhip;
    static const CColor PeachPuff;
    static const CColor Peru;
    static const CColor Pink;
    static const CColor Plum;
    static const CColor PowderBlue;
    static const CColor RebeccaPurple;
    static const CColor RosyBrown;
    static const CColor RoyalBlue;
    static const CColor SaddleBrown;
    static const CColor Salmon;
    static const CColor SandyBrown;
    static const CColor SeaGreen;
    static const CColor SeaShell;
    static const CColor Sienna;
    static const CColor SkyBlue;
    static const CColor SlateBlue;
    static const CColor SlateGray;
    static const CColor Snow;
    static const CColor SpringGreen;
    static const CColor SteelBlue;
    static const CColor Tan;
    static const CColor Thistle;
    static const CColor Tomato;
    static const CColor Turquoise;
    static const CColor Violet;
    static const CColor Wheat;
    static const CColor WhiteSmoke;
    static const CColor YellowGreen;

    static Color HSV2RGB(const int hue, const float saturation, const float value); // Convert from HSV to RGB. Hue - 0..360, saturation - 0..1, value - 0..1
    static void RGB2HSV(const Color &rgb, int &hue, float &saturation, float &value); // Convert form RGB to HSV

    template<class F> static void EnumStandardColors(F callback); // Call callback for all colors marked as standard
    template<class F> static void EnumExtendedColors(F callback); // Call callback for all colors not marked as standard
};
Namespace: nitisa
Include: Nitisa/Core/Colors.h