/*
* TVColor struct by Rein Krul
*
* You're free to use it in any way, but leave this header
* in the source, of better, give some credits inside
* the applciation.
*
* 08-2006
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace TVColor
{
public struct TVColor
{
//CONSTRUCTORS
static TVColor()
{
oAliceBlue = new TVColor(1.0625f, 1.028226f, 1f, 1f, "AliceBlue");
oAntiqueWhite = new TVColor(1.02f, 1.085106f, 1.186046f, 1f, "AntiqueWhite");
oAqua = new TVColor(0f, 1f, 1f, 1f, "Aqua");
oAquamarine = new TVColor(2.007874f, 1f, 1.20283f, 1f, "Aquamarine");
oAzure = new TVColor(1.0625f, 1f, 1f, 1f, "Azure");
oBeige = new TVColor(1.040816f, 1.040816f, 1.159091f, 1f, "Beige");
oBisque = new TVColor(1f, 1.118421f, 1.30102f, 1f, "Bisque");
oBlack = new TVColor(0f, 0f, 0f, 1f, "Black");
oBlanchedAlmond = new TVColor(1f, 1.085106f, 1.243902f, 1f, "BlanchedAlmond");
oBlue = new TVColor(0f, 0f, 1f, 1f, "Blue");
oBlueViolet = new TVColor(1.847826f, 5.930233f, 1.128319f, 1f, "BlueViolet");
oBrown = new TVColor(1.545455f, 6.071429f, 6.071429f, 1f, "Brown");
oBurlyWood = new TVColor(1.148649f, 1.38587f, 1.888889f, 1f, "BurlyWood");
oCadetBlue = new TVColor(2.684211f, 1.613924f, 1.59375f, 1f, "CadetBlue");
oChartreuse = new TVColor(2.007874f, 1f, 0f, 1f, "Chartreuse");
oChocolate = new TVColor(1.214286f, 2.428571f, 8.5f, 1f, "Chocolate");
oCoral = new TVColor(1f, 2.007874f, 3.1875f, 1f, "Coral");
oCornflowerBlue = new TVColor(2.55f, 1.711409f, 1.075949f, 1f, "CornflowerBlue");
oCornsilk = new TVColor(1f, 1.028226f, 1.159091f, 1f, "Cornsilk");
oCrimson = new TVColor(1.159091f, 12.75f, 4.25f, 1f, "Crimson");
oCyan = new TVColor(0f, 1f, 1f, 1f, "Cyan");
oDarkBlue = new TVColor(0f, 0f, 1.834532f, 1f, "DarkBlue");
oDarkCyan = new TVColor(0f, 1.834532f, 1.834532f, 1f, "DarkCyan");
oDarkGoldenrod = new TVColor(1.38587f, 1.902985f, 23.18182f, 1f, "DarkGoldenrod");
oDarkGray = new TVColor(1.508876f, 1.508876f, 1.508876f, 1f, "DarkGray");
oDarkGreen = new TVColor(0f, 2.55f, 0f, 1f, "DarkGreen");
oDarkKhaki = new TVColor(1.349206f, 1.393443f, 2.383178f, 1f, "DarkKhaki");
oDarkMagenta = new TVColor(1.834532f, 0f, 1.834532f, 1f, "DarkMagenta");
oDarkOliveGreen = new TVColor(3f, 2.383178f, 5.425532f, 1f, "DarkOliveGreen");
oDarkOrange = new TVColor(1f, 1.821429f, 0f, 1f, "DarkOrange");
oDarkOrchid = new TVColor(1.666667f, 5.1f, 1.25f, 1f, "DarkOrchid");
oDarkRed = new TVColor(1.834532f, 0f, 0f, 1f, "DarkRed");
oDarkSalmon = new TVColor(1.094421f, 1.7f, 2.090164f, 1f, "DarkSalmon");
oDarkSeaGreen = new TVColor(1.783217f, 1.356383f, 1.834532f, 1f, "DarkSeaGreen");
oDarkSlateBlue = new TVColor(3.541667f, 4.180328f, 1.834532f, 1f, "DarkSlateBlue");
oDarkSlateGray = new TVColor(5.425532f, 3.227848f, 3.227848f, 1f, "DarkSlateGray");
oDarkTurquoise = new TVColor(0f, 1.237864f, 1.220096f, 1f, "DarkTurquoise");
oDarkViolet = new TVColor(1.722973f, 0f, 1.208531f, 1f, "DarkViolet");
oDeepPink = new TVColor(1f, 12.75f, 1.734694f, 1f, "DeepPink");
oDeepSkyBlue = new TVColor(0f, 1.335078f, 1f, 1f, "DeepSkyBlue");
oDimGray = new TVColor(2.428571f, 2.428571f, 2.428571f, 1f, "DimGray");
oDodgerBlue = new TVColor(8.5f, 1.770833f, 1f, 1f, "DodgerBlue");
oFirebrick = new TVColor(1.432584f, 7.5f, 7.5f, 1f, "Firebrick");
oFloralWhite = new TVColor(1f, 1.02f, 1.0625f, 1f, "FloralWhite");
oForestGreen = new TVColor(7.5f, 1.834532f, 7.5f, 1f, "ForestGreen");
oFuchsia = new TVColor(1f, 0f, 1f, 1f, "Fuchsia");
oGainsboro = new TVColor(1.159091f, 1.159091f, 1.159091f, 1f, "Gainsboro");
oGhostWhite = new TVColor(1.028226f, 1.028226f, 1f, 1f, "GhostWhite");
oGold = new TVColor(1f, 1.186046f, 0f, 1f, "Gold");
oGoldenrod = new TVColor(1.169725f, 1.545455f, 7.96875f, 1f, "Goldenrod");
oGray = new TVColor(1.992188f, 1.992188f, 1.992188f, 1f, "Gray");
oGreen = new TVColor(0f, 1.992188f, 0f, 1f, "Green");
oGreenYellow = new TVColor(1.473988f, 1f, 5.425532f, 1f, "GreenYellow");
oHoneydew = new TVColor(1.0625f, 1f, 1.0625f, 1f, "Honeydew");
oHotPink = new TVColor(1f, 2.428571f, 1.416667f, 1f, "HotPink");
oIndianRed = new TVColor(1.243902f, 2.771739f, 2.771739f, 1f, "IndianRed");
oIndigo = new TVColor(3.4f, 0f, 1.961538f, 1f, "Indigo");
oIvory = new TVColor(1f, 1f, 1.0625f, 1f, "Ivory");
oKhaki = new TVColor(1.0625f, 1.108696f, 1.821429f, 1f, "Khaki");
oLavender = new TVColor(1.108696f, 1.108696f, 1.02f, 1f, "Lavender");
oLavenderBlush = new TVColor(1f, 1.0625f, 1.040816f, 1f, "LavenderBlush");
oLawnGreen = new TVColor(2.056452f, 1.011905f, 0f, 1f, "LawnGreen");
oLemonChiffon = new TVColor(1f, 1.02f, 1.243902f, 1f, "LemonChiffon");
oLightBlue = new TVColor(1.473988f, 1.180556f, 1.108696f, 1f, "LightBlue");
oLightCoral = new TVColor(1.0625f, 1.992188f, 1.992188f, 1f, "LightCoral");
oLightCyan = new TVColor(1.138393f, 1f, 1f, 1f, "LightCyan");
oLightGoldenrodYellow = new TVColor(1.02f, 1.02f, 1.214286f, 1f, "LightGoldenrodYellow");
oLightGray = new TVColor(1.208531f, 1.208531f, 1.208531f, 1f, "LightGray");
oLightGreen = new TVColor(1.770833f, 1.071429f, 1.770833f, 1f, "LightGreen");
oLightPink = new TVColor(1f, 1.401099f, 1.321244f, 1f, "LightPink");
oLightSalmon = new TVColor(1f, 1.59375f, 2.090164f, 1f, "LightSalmon");
oLightSeaGreen = new TVColor(7.96875f, 1.432584f, 1.5f, 1f, "LightSeaGreen");
oLightSkyBlue = new TVColor(1.888889f, 1.237864f, 1.02f, 1f, "LightSkyBlue");
oLightSlateGray = new TVColor(2.142857f, 1.875f, 1.666667f, 1f, "LightSlateGray");
oLightSteelBlue = new TVColor(1.448864f, 1.30102f, 1.148649f, 1f, "LightSteelBlue");
oLightYellow = new TVColor(1f, 1f, 1.138393f, 1f, "LightYellow");
oLime = new TVColor(0f, 1f, 0f, 1f, "Lime");
oLimeGreen = new TVColor(5.1f, 1.243902f, 5.1f, 1f, "LimeGreen");
oLinen = new TVColor(1.02f, 1.0625f, 1.108696f, 1f, "Linen");
oMagenta = new TVColor(1f, 0f, 1f, 1f, "Magenta");
oMaroon = new TVColor(1.992188f, 0f, 0f, 1f, "Maroon");
oMediumAquamarine = new TVColor(2.5f, 1.243902f, 1.5f, 1f, "MediumAquamarine");
oMediumBlue = new TVColor(0f, 0f, 1.243902f, 1f, "MediumBlue");
oMediumOrchid = new TVColor(1.370968f, 3f, 1.208531f, 1f, "MediumOrchid");
oMediumPurple = new TVColor(1.734694f, 2.276786f, 1.164384f, 1f, "MediumPurple");
oMediumSeaGreen = new TVColor(4.25f, 1.424581f, 2.256637f, 1f, "MediumSeaGreen");
oMediumSlateBlue = new TVColor(2.073171f, 2.451923f, 1.071429f, 1f, "MediumSlateBlue");
oMediumSpringGreen = new TVColor(0f, 1.02f, 1.655844f, 1f, "MediumSpringGreen");
oMediumTurquoise = new TVColor(3.541667f, 1.220096f, 1.25f, 1f, "MediumTurquoise");
oMediumVioletRed = new TVColor(1.281407f, 12.14286f, 1.917293f, 1f, "MediumVioletRed");
oMidnightBlue = new TVColor(10.2f, 10.2f, 2.276786f, 1f, "MidnightBlue");
oMintCream = new TVColor(1.040816f, 1f, 1.02f, 1f, "MintCream");
oMistyRose = new TVColor(1f, 1.118421f, 1.133333f, 1f, "MistyRose");
oMoccasin = new TVColor(1f, 1.118421f, 1.40884f, 1f, "Moccasin");
oNavajoWhite = new TVColor(1f, 1.148649f, 1.473988f, 1f, "NavajoWhite");
oNavy = new TVColor(0f, 0f, 1.992188f, 1f, "Navy");
oOldLace = new TVColor(1.007905f, 1.040816f, 1.108696f, 1f, "OldLace");
oOlive = new TVColor(1.992188f, 1.992188f, 0f, 1f, "Olive");
oOliveDrab = new TVColor(2.383178f, 1.795775f, 7.285714f, 1f, "OliveDrab");
oOrange = new TVColor(1f, 1.545455f, 0f, 1f, "Orange");
oOrangeRed = new TVColor(1f, 3.695652f, 0f, 1f, "OrangeRed");
oOrchid = new TVColor(1.169725f, 2.276786f, 1.191589f, 1f, "Orchid");
oPaleGoldenrod = new TVColor(1.071429f, 1.099138f, 1.5f, 1f, "PaleGoldenrod");
oPaleGreen = new TVColor(1.677632f, 1.015936f, 1.677632f, 1f, "PaleGreen");
oPaleTurquoise = new TVColor(1.457143f, 1.071429f, 1.071429f, 1f, "PaleTurquoise");
oPaleVioletRed = new TVColor(1.164384f, 2.276786f, 1.734694f, 1f, "PaleVioletRed");
oPapayaWhip = new TVColor(1f, 1.066946f, 1.197183f, 1f, "PapayaWhip");
oPeachPuff = new TVColor(1f, 1.169725f, 1.378378f, 1f, "PeachPuff");
oPeru = new TVColor(1.243902f, 1.917293f, 4.047619f, 1f, "Peru");
oPink = new TVColor(1f, 1.328125f, 1.256158f, 1f, "Pink");
oPlum = new TVColor(1.153846f, 1.59375f, 1.153846f, 1f, "Plum");
oPowderBlue = new TVColor(1.448864f, 1.138393f, 1.108696f, 1f, "PowderBlue");
oPurple = new TVColor(1.992188f, 0f, 1.992188f, 1f, "Purple");
oRed = new TVColor(1f, 0f, 0f, 1f, "Red");
oRosyBrown = new TVColor(1.356383f, 1.783217f, 1.783217f, 1f, "RosyBrown");
oRoyalBlue = new TVColor(3.923077f, 2.428571f, 1.133333f, 1f, "RoyalBlue");
oSaddleBrown = new TVColor(1.834532f, 3.695652f, 13.42105f, 1f, "SaddleBrown");
oSalmon = new TVColor(1.02f, 1.992188f, 2.236842f, 1f, "Salmon");
oSandyBrown = new TVColor(1.045082f, 1.554878f, 2.65625f, 1f, "SandyBrown");
oSeaGreen = new TVColor(5.543478f, 1.834532f, 2.931035f, 1f, "SeaGreen");
oSeaShell = new TVColor(1f, 1.040816f, 1.071429f, 1f, "SeaShell");
oSienna = new TVColor(1.59375f, 3.109756f, 5.666667f, 1f, "Sienna");
oSilver = new TVColor(1.328125f, 1.328125f, 1.328125f, 1f, "Silver");
oSkyBlue = new TVColor(1.888889f, 1.237864f, 1.085106f, 1f, "SkyBlue");
oSlateBlue = new TVColor(2.40566f, 2.833333f, 1.243902f, 1f, "SlateBlue");
oSlateGray = new TVColor(2.276786f, 1.992188f, 1.770833f, 1f, "SlateGray");
oSnow = new TVColor(1f, 1.02f, 1.02f, 1f, "Snow");
oSpringGreen = new TVColor(0f, 1f, 2.007874f, 1f, "SpringGreen");
oSteelBlue = new TVColor(3.642857f, 1.961538f, 1.416667f, 1f, "SteelBlue");
oTan = new TVColor(1.214286f, 1.416667f, 1.821429f, 1f, "Tan");
oTeal = new TVColor(0f, 1.992188f, 1.992188f, 1f, "Teal");
oThistle = new TVColor(1.180556f, 1.335078f, 1.180556f, 1f, "Thistle");
oTomato = new TVColor(1f, 2.575758f, 3.591549f, 1f, "Tomato");
oTransparent = new TVColor(1f, 1f, 1f, 0f, "Transparent");
oTurquoise = new TVColor(3.984375f, 1.138393f, 1.225962f, 1f, "Turquoise");
oViolet = new TVColor(1.071429f, 1.961538f, 1.071429f, 1f, "Violet");
oWheat = new TVColor(1.040816f, 1.148649f, 1.424581f, 1f, "Wheat");
oWhite = new TVColor(1f, 1f, 1f, 1f, "White");
oWhiteSmoke = new TVColor(1.040816f, 1.040816f, 1.040816f, 1f, "WhiteSmoke");
oYellow = new TVColor(1f, 1f, 0f, 1f, "Yellow");
oYellowGreen = new TVColor(1.655844f, 1.243902f, 5.1f, 1f, "YellowGreen");
}
private TVColor(float r, float g, float b, float a, int rgba, string name)
{
this.fA = a;
this.fR = r;
this.fG = g;
this.fB = b;
this.iRGBA = rgba;
this.sName = name;
this.cNetColor = Color.FromArgb(iRGBA);
}
private TVColor(float r, float g, float b, float a, string name)
{
this.fA = a;
this.fR = r;
this.fG = g;
this.fB = b;
this.iRGBA = TVColor.EncodeRGBA(r, g, b, a);
this.sName = name;
this.cNetColor = Color.FromArgb(this.iRGBA);
}
//DEF: COLOR COMPONENTS
private float fA;
private float fR;
private float fG;
private float fB;
private int iRGBA;
private string sName;
private Color cNetColor;
//PROP: COLOR COMPONENTS
///
/// Returns the A component of the RGBA value of this color
///
public float A { get { return fA; } }
///
/// Returns the R component of the RGBA value of this color
///
public float R { get { return fR; } }
///
/// Returns the G component of the RGBA value of this color
///
public float G { get { return fG; } }
///
/// Returns the B component of the RGBA value of this color
///
public float B { get { return fB; } }
///
/// Returns the RGBA value of this color
///
public int RGBA { get { return iRGBA; } }
///
/// Returns the name of this color. If the name is unknown 'Unknown' is returned
///
public string Name { get { if (sName != "") { return sName; } else { return "Unknown"; } } }
///
/// Returns 'true' if this color can be indicated by a name
///
public bool IsNamedColor
{
get
{
if (this.sName == "")
{
return false;
}
else
{
return true;
}
}
}
//DEF: COLORS
#region //DEF: COLORS
private static TVColor oAliceBlue;
private static TVColor oAntiqueWhite;
private static TVColor oAqua;
private static TVColor oAquamarine;
private static TVColor oAzure;
private static TVColor oBeige;
private static TVColor oBisque;
private static TVColor oBlack;
private static TVColor oBlanchedAlmond;
private static TVColor oBlue;
private static TVColor oBlueViolet;
private static TVColor oBrown;
private static TVColor oBurlyWood;
private static TVColor oCadetBlue;
private static TVColor oChartreuse;
private static TVColor oChocolate;
private static TVColor oCoral;
private static TVColor oCornflowerBlue;
private static TVColor oCornsilk;
private static TVColor oCrimson;
private static TVColor oCyan;
private static TVColor oDarkBlue;
private static TVColor oDarkCyan;
private static TVColor oDarkGoldenrod;
private static TVColor oDarkGray;
private static TVColor oDarkGreen;
private static TVColor oDarkKhaki;
private static TVColor oDarkMagenta;
private static TVColor oDarkOliveGreen;
private static TVColor oDarkOrange;
private static TVColor oDarkOrchid;
private static TVColor oDarkRed;
private static TVColor oDarkSalmon;
private static TVColor oDarkSeaGreen;
private static TVColor oDarkSlateBlue;
private static TVColor oDarkSlateGray;
private static TVColor oDarkTurquoise;
private static TVColor oDarkViolet;
private static TVColor oDeepPink;
private static TVColor oDeepSkyBlue;
private static TVColor oDimGray;
private static TVColor oDodgerBlue;
private static TVColor oFirebrick;
private static TVColor oFloralWhite;
private static TVColor oForestGreen;
private static TVColor oFuchsia;
private static TVColor oGainsboro;
private static TVColor oGhostWhite;
private static TVColor oGold;
private static TVColor oGoldenrod;
private static TVColor oGray;
private static TVColor oGreen;
private static TVColor oGreenYellow;
private static TVColor oHoneydew;
private static TVColor oHotPink;
private static TVColor oIndianRed;
private static TVColor oIndigo;
private static TVColor oIvory;
private static TVColor oKhaki;
private static TVColor oLavender;
private static TVColor oLavenderBlush;
private static TVColor oLawnGreen;
private static TVColor oLemonChiffon;
private static TVColor oLightBlue;
private static TVColor oLightCoral;
private static TVColor oLightCyan;
private static TVColor oLightGoldenrodYellow;
private static TVColor oLightGray;
private static TVColor oLightGreen;
private static TVColor oLightPink;
private static TVColor oLightSalmon;
private static TVColor oLightSeaGreen;
private static TVColor oLightSkyBlue;
private static TVColor oLightSlateGray;
private static TVColor oLightSteelBlue;
private static TVColor oLightYellow;
private static TVColor oLime;
private static TVColor oLimeGreen;
private static TVColor oLinen;
private static TVColor oMagenta;
private static TVColor oMaroon;
private static TVColor oMediumAquamarine;
private static TVColor oMediumBlue;
private static TVColor oMediumOrchid;
private static TVColor oMediumPurple;
private static TVColor oMediumSeaGreen;
private static TVColor oMediumSlateBlue;
private static TVColor oMediumSpringGreen;
private static TVColor oMediumTurquoise;
private static TVColor oMediumVioletRed;
private static TVColor oMidnightBlue;
private static TVColor oMintCream;
private static TVColor oMistyRose;
private static TVColor oMoccasin;
private static TVColor oNavajoWhite;
private static TVColor oNavy;
private static TVColor oOldLace;
private static TVColor oOlive;
private static TVColor oOliveDrab;
private static TVColor oOrange;
private static TVColor oOrangeRed;
private static TVColor oOrchid;
private static TVColor oPaleGoldenrod;
private static TVColor oPaleGreen;
private static TVColor oPaleTurquoise;
private static TVColor oPaleVioletRed;
private static TVColor oPapayaWhip;
private static TVColor oPeachPuff;
private static TVColor oPeru;
private static TVColor oPink;
private static TVColor oPlum;
private static TVColor oPowderBlue;
private static TVColor oPurple;
private static TVColor oRed;
private static TVColor oRosyBrown;
private static TVColor oRoyalBlue;
private static TVColor oSaddleBrown;
private static TVColor oSalmon;
private static TVColor oSandyBrown;
private static TVColor oSeaGreen;
private static TVColor oSeaShell;
private static TVColor oSienna;
private static TVColor oSilver;
private static TVColor oSkyBlue;
private static TVColor oSlateBlue;
private static TVColor oSlateGray;
private static TVColor oSnow;
private static TVColor oSpringGreen;
private static TVColor oSteelBlue;
private static TVColor oTan;
private static TVColor oTeal;
private static TVColor oThistle;
private static TVColor oTomato;
private static TVColor oTransparent;
private static TVColor oTurquoise;
private static TVColor oViolet;
private static TVColor oWheat;
private static TVColor oWhite;
private static TVColor oWhiteSmoke;
private static TVColor oYellow;
private static TVColor oYellowGreen;
#endregion
//PROP: COLORS
#region //PROP: COLORS
public static TVColor AliceBlue
{
get { return oAliceBlue; }
}
public static TVColor AntiqueWhite
{
get { return oAntiqueWhite; }
}
public static TVColor Aqua
{
get { return oAqua; }
}
public static TVColor Aquamarine
{
get { return oAquamarine; }
}
public static TVColor Azure
{
get { return oAzure; }
}
public static TVColor Beige
{
get { return oBeige; }
}
public static TVColor Bisque
{
get { return oBisque; }
}
public static TVColor Black
{
get { return oBlack; }
}
public static TVColor BlanchedAlmond
{
get { return oBlanchedAlmond; }
}
public static TVColor Blue
{
get { return oBlue; }
}
public static TVColor BlueViolet
{
get { return oBlueViolet; }
}
public static TVColor Brown
{
get { return oBrown; }
}
public static TVColor BurlyWood
{
get { return oBurlyWood; }
}
public static TVColor CadetBlue
{
get { return oCadetBlue; }
}
public static TVColor Chartreuse
{
get { return oChartreuse; }
}
public static TVColor Chocolate
{
get { return oChocolate; }
}
public static TVColor Coral
{
get { return oCoral; }
}
public static TVColor CornflowerBlue
{
get { return oCornflowerBlue; }
}
public static TVColor Cornsilk
{
get { return oCornsilk; }
}
public static TVColor Crimson
{
get { return oCrimson; }
}
public static TVColor Cyan
{
get { return oCyan; }
}
public static TVColor DarkBlue
{
get { return oDarkBlue; }
}
public static TVColor DarkCyan
{
get { return oDarkCyan; }
}
public static TVColor DarkGoldenrod
{
get { return oDarkGoldenrod; }
}
public static TVColor DarkGray
{
get { return oDarkGray; }
}
public static TVColor DarkGreen
{
get { return oDarkGreen; }
}
public static TVColor DarkKhaki
{
get { return oDarkKhaki; }
}
public static TVColor DarkMagenta
{
get { return oDarkMagenta; }
}
public static TVColor DarkOliveGreen
{
get { return oDarkOliveGreen; }
}
public static TVColor DarkOrange
{
get { return oDarkOrange; }
}
public static TVColor DarkOrchid
{
get { return oDarkOrchid; }
}
public static TVColor DarkRed
{
get { return oDarkRed; }
}
public static TVColor DarkSalmon
{
get { return oDarkSalmon; }
}
public static TVColor DarkSeaGreen
{
get { return oDarkSeaGreen; }
}
public static TVColor DarkSlateBlue
{
get { return oDarkSlateBlue; }
}
public static TVColor DarkSlateGray
{
get { return oDarkSlateGray; }
}
public static TVColor DarkTurquoise
{
get { return oDarkTurquoise; }
}
public static TVColor DarkViolet
{
get { return oDarkViolet; }
}
public static TVColor DeepPink
{
get { return oDeepPink; }
}
public static TVColor DeepSkyBlue
{
get { return oDeepSkyBlue; }
}
public static TVColor DimGray
{
get { return oDimGray; }
}
public static TVColor DodgerBlue
{
get { return oDodgerBlue; }
}
public static TVColor Firebrick
{
get { return oFirebrick; }
}
public static TVColor FloralWhite
{
get { return oFloralWhite; }
}
public static TVColor ForestGreen
{
get { return oForestGreen; }
}
public static TVColor Fuchsia
{
get { return oFuchsia; }
}
public static TVColor Gainsboro
{
get { return oGainsboro; }
}
public static TVColor GhostWhite
{
get { return oGhostWhite; }
}
public static TVColor Gold
{
get { return oGold; }
}
public static TVColor Goldenrod
{
get { return oGoldenrod; }
}
public static TVColor Gray
{
get { return oGray; }
}
public static TVColor Green
{
get { return oGreen; }
}
public static TVColor GreenYellow
{
get { return oGreenYellow; }
}
public static TVColor Honeydew
{
get { return oHoneydew; }
}
public static TVColor HotPink
{
get { return oHotPink; }
}
public static TVColor IndianRed
{
get { return oIndianRed; }
}
public static TVColor Indigo
{
get { return oIndigo; }
}
public static TVColor Ivory
{
get { return oIvory; }
}
public static TVColor Khaki
{
get { return oKhaki; }
}
public static TVColor Lavender
{
get { return oLavender; }
}
public static TVColor LavenderBlush
{
get { return oLavenderBlush; }
}
public static TVColor LawnGreen
{
get { return oLawnGreen; }
}
public static TVColor LemonChiffon
{
get { return oLemonChiffon; }
}
public static TVColor LightBlue
{
get { return oLightBlue; }
}
public static TVColor LightCoral
{
get { return oLightCoral; }
}
public static TVColor LightCyan
{
get { return oLightCyan; }
}
public static TVColor LightGoldenrodYellow
{
get { return oLightGoldenrodYellow; }
}
public static TVColor LightGray
{
get { return oLightGray; }
}
public static TVColor LightGreen
{
get { return oLightGreen; }
}
public static TVColor LightPink
{
get { return oLightPink; }
}
public static TVColor LightSalmon
{
get { return oLightSalmon; }
}
public static TVColor LightSeaGreen
{
get { return oLightSeaGreen; }
}
public static TVColor LightSkyBlue
{
get { return oLightSkyBlue; }
}
public static TVColor LightSlateGray
{
get { return oLightSlateGray; }
}
public static TVColor LightSteelBlue
{
get { return oLightSteelBlue; }
}
public static TVColor LightYellow
{
get { return oLightYellow; }
}
public static TVColor Lime
{
get { return oLime; }
}
public static TVColor LimeGreen
{
get { return oLimeGreen; }
}
public static TVColor Linen
{
get { return oLinen; }
}
public static TVColor Magenta
{
get { return oMagenta; }
}
public static TVColor Maroon
{
get { return oMaroon; }
}
public static TVColor MediumAquamarine
{
get { return oMediumAquamarine; }
}
public static TVColor MediumBlue
{
get { return oMediumBlue; }
}
public static TVColor MediumOrchid
{
get { return oMediumOrchid; }
}
public static TVColor MediumPurple
{
get { return oMediumPurple; }
}
public static TVColor MediumSeaGreen
{
get { return oMediumSeaGreen; }
}
public static TVColor MediumSlateBlue
{
get { return oMediumSlateBlue; }
}
public static TVColor MediumSpringGreen
{
get { return oMediumSpringGreen; }
}
public static TVColor MediumTurquoise
{
get { return oMediumTurquoise; }
}
public static TVColor MediumVioletRed
{
get { return oMediumVioletRed; }
}
public static TVColor MidnightBlue
{
get { return oMidnightBlue; }
}
public static TVColor MintCream
{
get { return oMintCream; }
}
public static TVColor MistyRose
{
get { return oMistyRose; }
}
public static TVColor Moccasin
{
get { return oMoccasin; }
}
public static TVColor NavajoWhite
{
get { return oNavajoWhite; }
}
public static TVColor Navy
{
get { return oNavy; }
}
public static TVColor OldLace
{
get { return oOldLace; }
}
public static TVColor Olive
{
get { return oOlive; }
}
public static TVColor OliveDrab
{
get { return oOliveDrab; }
}
public static TVColor Orange
{
get { return oOrange; }
}
public static TVColor OrangeRed
{
get { return oOrangeRed; }
}
public static TVColor Orchid
{
get { return oOrchid; }
}
public static TVColor PaleGoldenrod
{
get { return oPaleGoldenrod; }
}
public static TVColor PaleGreen
{
get { return oPaleGreen; }
}
public static TVColor PaleTurquoise
{
get { return oPaleTurquoise; }
}
public static TVColor PaleVioletRed
{
get { return oPaleVioletRed; }
}
public static TVColor PapayaWhip
{
get { return oPapayaWhip; }
}
public static TVColor PeachPuff
{
get { return oPeachPuff; }
}
public static TVColor Peru
{
get { return oPeru; }
}
public static TVColor Pink
{
get { return oPink; }
}
public static TVColor Plum
{
get { return oPlum; }
}
public static TVColor PowderBlue
{
get { return oPowderBlue; }
}
public static TVColor Purple
{
get { return oPurple; }
}
public static TVColor Red
{
get { return oRed; }
}
public static TVColor RosyBrown
{
get { return oRosyBrown; }
}
public static TVColor RoyalBlue
{
get { return oRoyalBlue; }
}
public static TVColor SaddleBrown
{
get { return oSaddleBrown; }
}
public static TVColor Salmon
{
get { return oSalmon; }
}
public static TVColor SandyBrown
{
get { return oSandyBrown; }
}
public static TVColor SeaGreen
{
get { return oSeaGreen; }
}
public static TVColor SeaShell
{
get { return oSeaShell; }
}
public static TVColor Sienna
{
get { return oSienna; }
}
public static TVColor Silver
{
get { return oSilver; }
}
public static TVColor SkyBlue
{
get { return oSkyBlue; }
}
public static TVColor SlateBlue
{
get { return oSlateBlue; }
}
public static TVColor SlateGray
{
get { return oSlateGray; }
}
public static TVColor Snow
{
get { return oSnow; }
}
public static TVColor SpringGreen
{
get { return oSpringGreen; }
}
public static TVColor SteelBlue
{
get { return oSteelBlue; }
}
public static TVColor Tan
{
get { return oTan; }
}
public static TVColor Teal
{
get { return oTeal; }
}
public static TVColor Thistle
{
get { return oThistle; }
}
public static TVColor Tomato
{
get { return oTomato; }
}
public static TVColor Transparent
{
get { return oTransparent; }
}
public static TVColor Turquoise
{
get { return oTurquoise; }
}
public static TVColor Violet
{
get { return oViolet; }
}
public static TVColor Wheat
{
get { return oWheat; }
}
public static TVColor White
{
get { return oWhite; }
}
public static TVColor WhiteSmoke
{
get { return oWhiteSmoke; }
}
public static TVColor Yellow
{
get { return oYellow; }
}
public static TVColor YellowGreen
{
get { return oYellowGreen; }
}
#endregion
#region Misc methods
//METHODS: MISC
///
/// Parses a RGBA value to create a TVColor object. Credits to BYTE-Smasher for this one ^.^
///
/// RGBA value
/// TVColor object created from the RGBA value
public static TVColor Parse(int iRGBA)
{
//I copied this code from BYTE-Smasher.
// Some credits to byte :)
double rgb2, blu, grn, red, alpha;
rgb2 = iRGBA;
if (iRGBA < rgb2 =" Math.Pow(256," blu =" ((rgb2" rgb2 =" (rgb2" grn =" rgb2" red =" (rgb2" alpha =" ((rgb2" red =" red" grn =" grn" blu =" blu" alpha =" alpha">
/// Calculates the brightness of this color according to the HSB set
///
/// Brightness
public float GetBrightness() { return this.cNetColor.GetBrightness(); }
///
/// Calculates the hue of this color according to the HSB set
///
/// Hue
public float GetHue() { return this.cNetColor.GetHue(); }
///
/// Calculates the saturation of this color according to the HSB set
///
/// Saturation
public float GetSaturation() { return this.cNetColor.GetSaturation(); }
///
/// Parses the 4 RGBA components to create a TVColor object
///
/// R component
/// G component
/// B component
/// A component
/// TVColor object created from the 4 components
public static TVColor Parse(float r, float g, float b, float a)
{
return new TVColor(r, g, b, a, "Unknown");
}
///
/// Internal function to encode an 32-bit RGBA value from r, g, b and a components.
/// Credits to Sylvain for this great piece of code :)
///
/// R component
/// G component
/// B component
/// A component
/// 32-bit encoded RGBA value
private static int EncodeRGBA(float r, float g, float b, float a)
{
//Thank Sylvain for this piece of code!
uint uA = (uint)(1f / a * 255f);
uint uR = (uint)(1f / r * 255f);
uint uG = (uint)(1f / g * 255f);
uint uB = (uint)(1f / b * 255f);
return (int)(uA * 16777216u + uR * 65536u + uG * 255u + uB);
}
#endregion
#region override base
public static bool operator !=(TVColor left, TVColor right)
{
if (left.RGBA == right.RGBA) return true;
else return false;
}
public static bool operator ==(TVColor left, TVColor right)
{
if (left.RGBA == right.RGBA) return true;
else return false;
}
public override bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
///
/// Coverts this TVColor instance to a string
///
/// Type and name of this object in text
public override string ToString()
{
return "TVColor [" + this.Name + "]";
}
#endregion
}
}