mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
ScriptCore: Color structs
This commit is contained in:
@@ -0,0 +1,198 @@
|
|||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace GlitchyEngine.Math;
|
||||||
|
|
||||||
|
using static GlitchyEngine.Math.Math;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a color with red, blue, green color channels and alpha.
|
||||||
|
/// <br/>Each channel is represented by a <see cref="byte"/>
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack=1)]
|
||||||
|
public struct Color
|
||||||
|
{
|
||||||
|
public static readonly Color AliceBlue = (Color)ColorRGBA.AliceBlue;
|
||||||
|
public static readonly Color AntiqueWhite = (Color)ColorRGBA.AntiqueWhite;
|
||||||
|
public static readonly Color Aqua = (Color)ColorRGBA.Aqua;
|
||||||
|
public static readonly Color Aquamarine = (Color)ColorRGBA.Aquamarine;
|
||||||
|
public static readonly Color Azure = (Color)ColorRGBA.Azure;
|
||||||
|
public static readonly Color Beige = (Color)ColorRGBA.Beige;
|
||||||
|
public static readonly Color Bisque = (Color)ColorRGBA.Bisque;
|
||||||
|
public static readonly Color Black = (Color)ColorRGBA.Black;
|
||||||
|
public static readonly Color BlanchedAlmond = (Color)ColorRGBA.BlanchedAlmond;
|
||||||
|
public static readonly Color Blue = (Color)ColorRGBA.Blue;
|
||||||
|
public static readonly Color BlueViolet = (Color)ColorRGBA.BlueViolet;
|
||||||
|
public static readonly Color Brown = (Color)ColorRGBA.Brown;
|
||||||
|
public static readonly Color BurlyWood = (Color)ColorRGBA.BurlyWood;
|
||||||
|
public static readonly Color CadetBlue = (Color)ColorRGBA.CadetBlue;
|
||||||
|
public static readonly Color Chartreuse = (Color)ColorRGBA.Chartreuse;
|
||||||
|
public static readonly Color Chocolate = (Color)ColorRGBA.Chocolate;
|
||||||
|
public static readonly Color Coral = (Color)ColorRGBA.Coral;
|
||||||
|
public static readonly Color CornflowerBlue = (Color)ColorRGBA.CornflowerBlue;
|
||||||
|
public static readonly Color Cornsilk = (Color)ColorRGBA.Cornsilk;
|
||||||
|
public static readonly Color Crimson = (Color)ColorRGBA.Crimson;
|
||||||
|
public static readonly Color Cyan = (Color)ColorRGBA.Cyan;
|
||||||
|
public static readonly Color DarkBlue = (Color)ColorRGBA.DarkBlue;
|
||||||
|
public static readonly Color DarkCyan = (Color)ColorRGBA.DarkCyan;
|
||||||
|
public static readonly Color DarkGoldenrod = (Color)ColorRGBA.DarkGoldenrod;
|
||||||
|
public static readonly Color DarkGray = (Color)ColorRGBA.DarkGray;
|
||||||
|
public static readonly Color DarkGreen = (Color)ColorRGBA.DarkGreen;
|
||||||
|
public static readonly Color DarkKhaki = (Color)ColorRGBA.DarkKhaki;
|
||||||
|
public static readonly Color DarkMagenta = (Color)ColorRGBA.DarkMagenta;
|
||||||
|
public static readonly Color DarkOliveGreen = (Color)ColorRGBA.DarkOliveGreen;
|
||||||
|
public static readonly Color DarkOrange = (Color)ColorRGBA.DarkOrange;
|
||||||
|
public static readonly Color DarkOrchid = (Color)ColorRGBA.DarkOrchid;
|
||||||
|
public static readonly Color DarkRed = (Color)ColorRGBA.DarkRed;
|
||||||
|
public static readonly Color DarkSalmon = (Color)ColorRGBA.DarkSalmon;
|
||||||
|
public static readonly Color DarkSeaGreen = (Color)ColorRGBA.DarkSeaGreen;
|
||||||
|
public static readonly Color DarkSlateBlue = (Color)ColorRGBA.DarkSlateBlue;
|
||||||
|
public static readonly Color DarkSlateGray = (Color)ColorRGBA.DarkSlateGray;
|
||||||
|
public static readonly Color DarkTurquoise = (Color)ColorRGBA.DarkTurquoise;
|
||||||
|
public static readonly Color DarkViolet = (Color)ColorRGBA.DarkViolet;
|
||||||
|
public static readonly Color DeepPink = (Color)ColorRGBA.DeepPink;
|
||||||
|
public static readonly Color DeepSkyBlue = (Color)ColorRGBA.DeepSkyBlue;
|
||||||
|
public static readonly Color DimGray = (Color)ColorRGBA.DimGray;
|
||||||
|
public static readonly Color DodgerBlue = (Color)ColorRGBA.DodgerBlue;
|
||||||
|
public static readonly Color Firebrick = (Color)ColorRGBA.Firebrick;
|
||||||
|
public static readonly Color FloralWhite = (Color)ColorRGBA.FloralWhite;
|
||||||
|
public static readonly Color ForestGreen = (Color)ColorRGBA.ForestGreen;
|
||||||
|
public static readonly Color Fuchsia = (Color)ColorRGBA.Fuchsia;
|
||||||
|
public static readonly Color Gainsboro = (Color)ColorRGBA.Gainsboro;
|
||||||
|
public static readonly Color GhostWhite = (Color)ColorRGBA.GhostWhite;
|
||||||
|
public static readonly Color Gold = (Color)ColorRGBA.Gold;
|
||||||
|
public static readonly Color Goldenrod = (Color)ColorRGBA.Goldenrod;
|
||||||
|
public static readonly Color Gray = (Color)ColorRGBA.Gray;
|
||||||
|
public static readonly Color Green = (Color)ColorRGBA.Green;
|
||||||
|
public static readonly Color GreenYellow = (Color)ColorRGBA.GreenYellow;
|
||||||
|
public static readonly Color Honeydew = (Color)ColorRGBA.Honeydew;
|
||||||
|
public static readonly Color HotPink = (Color)ColorRGBA.HotPink;
|
||||||
|
public static readonly Color IndianRed = (Color)ColorRGBA.IndianRed;
|
||||||
|
public static readonly Color Indigo = (Color)ColorRGBA.Indigo;
|
||||||
|
public static readonly Color Ivory = (Color)ColorRGBA.Ivory;
|
||||||
|
public static readonly Color Khaki = (Color)ColorRGBA.Khaki;
|
||||||
|
public static readonly Color Lavender = (Color)ColorRGBA.Lavender;
|
||||||
|
public static readonly Color LavenderBlush = (Color)ColorRGBA.LavenderBlush;
|
||||||
|
public static readonly Color LawnGreen = (Color)ColorRGBA.LawnGreen;
|
||||||
|
public static readonly Color LemonChiffon = (Color)ColorRGBA.LemonChiffon;
|
||||||
|
public static readonly Color LightBlue = (Color)ColorRGBA.LightBlue;
|
||||||
|
public static readonly Color LightCoral = (Color)ColorRGBA.LightCoral;
|
||||||
|
public static readonly Color LightCyan = (Color)ColorRGBA.LightCyan;
|
||||||
|
public static readonly Color LightGoldenrodYellow = (Color)ColorRGBA.LightGoldenrodYellow;
|
||||||
|
public static readonly Color LightGreen = (Color)ColorRGBA.LightGreen;
|
||||||
|
public static readonly Color LightGray = (Color)ColorRGBA.LightGray;
|
||||||
|
public static readonly Color LightPink = (Color)ColorRGBA.LightPink;
|
||||||
|
public static readonly Color LightSalmon = (Color)ColorRGBA.LightSalmon;
|
||||||
|
public static readonly Color LightSeaGreen = (Color)ColorRGBA.LightSeaGreen;
|
||||||
|
public static readonly Color LightSkyBlue = (Color)ColorRGBA.LightSkyBlue;
|
||||||
|
public static readonly Color LightSlateGray = (Color)ColorRGBA.LightSlateGray;
|
||||||
|
public static readonly Color LightSteelBlue = (Color)ColorRGBA.LightSteelBlue;
|
||||||
|
public static readonly Color LightYellow = (Color)ColorRGBA.LightYellow;
|
||||||
|
public static readonly Color Lime = (Color)ColorRGBA.Lime;
|
||||||
|
public static readonly Color LimeGreen = (Color)ColorRGBA.LimeGreen;
|
||||||
|
public static readonly Color Linen = (Color)ColorRGBA.Linen;
|
||||||
|
public static readonly Color Magenta = (Color)ColorRGBA.Magenta;
|
||||||
|
public static readonly Color Maroon = (Color)ColorRGBA.Maroon;
|
||||||
|
public static readonly Color MediumAquamarine = (Color)ColorRGBA.MediumAquamarine;
|
||||||
|
public static readonly Color MediumBlue = (Color)ColorRGBA.MediumBlue;
|
||||||
|
public static readonly Color MediumOrchid = (Color)ColorRGBA.MediumOrchid;
|
||||||
|
public static readonly Color MediumPurple = (Color)ColorRGBA.MediumPurple;
|
||||||
|
public static readonly Color MediumSeaGreen = (Color)ColorRGBA.MediumSeaGreen;
|
||||||
|
public static readonly Color MediumSlateBlue = (Color)ColorRGBA.MediumSlateBlue;
|
||||||
|
public static readonly Color MediumSpringGreen = (Color)ColorRGBA.MediumSpringGreen;
|
||||||
|
public static readonly Color MediumTurquoise = (Color)ColorRGBA.MediumTurquoise;
|
||||||
|
public static readonly Color MediumVioletRed = (Color)ColorRGBA.MediumVioletRed;
|
||||||
|
public static readonly Color MidnightBlue = (Color)ColorRGBA.MidnightBlue;
|
||||||
|
public static readonly Color MintCream = (Color)ColorRGBA.MintCream;
|
||||||
|
public static readonly Color MistyRose = (Color)ColorRGBA.MistyRose;
|
||||||
|
public static readonly Color Moccasin = (Color)ColorRGBA.Moccasin;
|
||||||
|
public static readonly Color NavajoWhite = (Color)ColorRGBA.NavajoWhite;
|
||||||
|
public static readonly Color Navy = (Color)ColorRGBA.Navy;
|
||||||
|
public static readonly Color OldLace = (Color)ColorRGBA.OldLace;
|
||||||
|
public static readonly Color Olive = (Color)ColorRGBA.Olive;
|
||||||
|
public static readonly Color OliveDrab = (Color)ColorRGBA.OliveDrab;
|
||||||
|
public static readonly Color Orange = (Color)ColorRGBA.Orange;
|
||||||
|
public static readonly Color OrangeRed = (Color)ColorRGBA.OrangeRed;
|
||||||
|
public static readonly Color Orchid = (Color)ColorRGBA.Orchid;
|
||||||
|
public static readonly Color PaleGoldenrod = (Color)ColorRGBA.PaleGoldenrod;
|
||||||
|
public static readonly Color PaleGreen = (Color)ColorRGBA.PaleGreen;
|
||||||
|
public static readonly Color PaleTurquoise = (Color)ColorRGBA.PaleTurquoise;
|
||||||
|
public static readonly Color PaleVioletRed = (Color)ColorRGBA.PaleVioletRed;
|
||||||
|
public static readonly Color PapayaWhip = (Color)ColorRGBA.PapayaWhip;
|
||||||
|
public static readonly Color PeachPuff = (Color)ColorRGBA.PeachPuff;
|
||||||
|
public static readonly Color Peru = (Color)ColorRGBA.Peru;
|
||||||
|
public static readonly Color Pink = (Color)ColorRGBA.Pink;
|
||||||
|
public static readonly Color Plum = (Color)ColorRGBA.Plum;
|
||||||
|
public static readonly Color PowderBlue = (Color)ColorRGBA.PowderBlue;
|
||||||
|
public static readonly Color Purple = (Color)ColorRGBA.Purple;
|
||||||
|
public static readonly Color Red = (Color)ColorRGBA.Red;
|
||||||
|
public static readonly Color RosyBrown = (Color)ColorRGBA.RosyBrown;
|
||||||
|
public static readonly Color RoyalBlue = (Color)ColorRGBA.RoyalBlue;
|
||||||
|
public static readonly Color SaddleBrown = (Color)ColorRGBA.SaddleBrown;
|
||||||
|
public static readonly Color Salmon = (Color)ColorRGBA.Salmon;
|
||||||
|
public static readonly Color SandyBrown = (Color)ColorRGBA.SandyBrown;
|
||||||
|
public static readonly Color SeaGreen = (Color)ColorRGBA.SeaGreen;
|
||||||
|
public static readonly Color SeaShell = (Color)ColorRGBA.SeaShell;
|
||||||
|
public static readonly Color Sienna = (Color)ColorRGBA.Sienna;
|
||||||
|
public static readonly Color Silver = (Color)ColorRGBA.Silver;
|
||||||
|
public static readonly Color SkyBlue = (Color)ColorRGBA.SkyBlue;
|
||||||
|
public static readonly Color SlateBlue = (Color)ColorRGBA.SlateBlue;
|
||||||
|
public static readonly Color SlateGray = (Color)ColorRGBA.SlateGray;
|
||||||
|
public static readonly Color Snow = (Color)ColorRGBA.Snow;
|
||||||
|
public static readonly Color SpringGreen = (Color)ColorRGBA.SpringGreen;
|
||||||
|
public static readonly Color SteelBlue = (Color)ColorRGBA.SteelBlue;
|
||||||
|
public static readonly Color Tan = (Color)ColorRGBA.Tan;
|
||||||
|
public static readonly Color Teal = (Color)ColorRGBA.Teal;
|
||||||
|
public static readonly Color Thistle = (Color)ColorRGBA.Thistle;
|
||||||
|
public static readonly Color Tomato = (Color)ColorRGBA.Tomato;
|
||||||
|
public static readonly Color Transparent = (Color)ColorRGBA.Transparent;
|
||||||
|
public static readonly Color Turquoise = (Color)ColorRGBA.Turquoise;
|
||||||
|
public static readonly Color Violet = (Color)ColorRGBA.Violet;
|
||||||
|
public static readonly Color Wheat = (Color)ColorRGBA.Wheat;
|
||||||
|
public static readonly Color White = (Color)ColorRGBA.White;
|
||||||
|
public static readonly Color WhiteSmoke = (Color)ColorRGBA.WhiteSmoke;
|
||||||
|
public static readonly Color Yellow = (Color)ColorRGBA.Yellow;
|
||||||
|
public static readonly Color YellowGreen = (Color)ColorRGBA.YellowGreen;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The red component of the color.
|
||||||
|
/// </summary>
|
||||||
|
public byte R;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The green component of the color.
|
||||||
|
/// </summary>
|
||||||
|
public byte G;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The blue component of the color.
|
||||||
|
/// </summary>
|
||||||
|
public byte B;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The alpha component of the color.
|
||||||
|
/// </summary>
|
||||||
|
public byte A;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of <see cref="Color"/> with all components set to 0.
|
||||||
|
/// </summary>
|
||||||
|
public Color() { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of <see cref="Color"/> with the specified values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="r">The red component of the color.</param>
|
||||||
|
/// <param name="g">The green component of the color.</param>
|
||||||
|
/// <param name="b">The blue component of the color.</param>
|
||||||
|
/// <param name="a">The alpha component of the color.</param>
|
||||||
|
public Color(byte r, byte g, byte b, byte a = 255)
|
||||||
|
{
|
||||||
|
R = r;
|
||||||
|
G = g;
|
||||||
|
B = b;
|
||||||
|
A = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static explicit operator ColorRGBA(Color color) => new ColorRGBA(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
||||||
|
public static explicit operator Color(ColorRGBA color) => new Color((byte)(color.R * 255.0f), (byte)(color.G * 255.0f), (byte)(color.B * 255.0f), (byte)(color.A * 255.0f));
|
||||||
|
}
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace GlitchyEngine.Math;
|
||||||
|
|
||||||
|
using static GlitchyEngine.Math.Math;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a color with red, blue, green color channels.
|
||||||
|
/// <br/>Each channel is represented by a <see cref="float"/>
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack=1)]
|
||||||
|
public struct ColorRGB
|
||||||
|
{
|
||||||
|
public static readonly ColorRGB AliceBlue = (ColorRGB)ColorRGBA.AliceBlue;
|
||||||
|
public static readonly ColorRGB AntiqueWhite = (ColorRGB)ColorRGBA.AntiqueWhite;
|
||||||
|
public static readonly ColorRGB Aqua = (ColorRGB)ColorRGBA.Aqua;
|
||||||
|
public static readonly ColorRGB Aquamarine = (ColorRGB)ColorRGBA.Aquamarine;
|
||||||
|
public static readonly ColorRGB Azure = (ColorRGB)ColorRGBA.Azure;
|
||||||
|
public static readonly ColorRGB Beige = (ColorRGB)ColorRGBA.Beige;
|
||||||
|
public static readonly ColorRGB Bisque = (ColorRGB)ColorRGBA.Bisque;
|
||||||
|
public static readonly ColorRGB Black = (ColorRGB)ColorRGBA.Black;
|
||||||
|
public static readonly ColorRGB BlanchedAlmond = (ColorRGB)ColorRGBA.BlanchedAlmond;
|
||||||
|
public static readonly ColorRGB Blue = (ColorRGB)ColorRGBA.Blue;
|
||||||
|
public static readonly ColorRGB BlueViolet = (ColorRGB)ColorRGBA.BlueViolet;
|
||||||
|
public static readonly ColorRGB Brown = (ColorRGB)ColorRGBA.Brown;
|
||||||
|
public static readonly ColorRGB BurlyWood = (ColorRGB)ColorRGBA.BurlyWood;
|
||||||
|
public static readonly ColorRGB CadetBlue = (ColorRGB)ColorRGBA.CadetBlue;
|
||||||
|
public static readonly ColorRGB Chartreuse = (ColorRGB)ColorRGBA.Chartreuse;
|
||||||
|
public static readonly ColorRGB Chocolate = (ColorRGB)ColorRGBA.Chocolate;
|
||||||
|
public static readonly ColorRGB Coral = (ColorRGB)ColorRGBA.Coral;
|
||||||
|
public static readonly ColorRGB CornflowerBlue = (ColorRGB)ColorRGBA.CornflowerBlue;
|
||||||
|
public static readonly ColorRGB Cornsilk = (ColorRGB)ColorRGBA.Cornsilk;
|
||||||
|
public static readonly ColorRGB Crimson = (ColorRGB)ColorRGBA.Crimson;
|
||||||
|
public static readonly ColorRGB Cyan = (ColorRGB)ColorRGBA.Cyan;
|
||||||
|
public static readonly ColorRGB DarkBlue = (ColorRGB)ColorRGBA.DarkBlue;
|
||||||
|
public static readonly ColorRGB DarkCyan = (ColorRGB)ColorRGBA.DarkCyan;
|
||||||
|
public static readonly ColorRGB DarkGoldenrod = (ColorRGB)ColorRGBA.DarkGoldenrod;
|
||||||
|
public static readonly ColorRGB DarkGray = (ColorRGB)ColorRGBA.DarkGray;
|
||||||
|
public static readonly ColorRGB DarkGreen = (ColorRGB)ColorRGBA.DarkGreen;
|
||||||
|
public static readonly ColorRGB DarkKhaki = (ColorRGB)ColorRGBA.DarkKhaki;
|
||||||
|
public static readonly ColorRGB DarkMagenta = (ColorRGB)ColorRGBA.DarkMagenta;
|
||||||
|
public static readonly ColorRGB DarkOliveGreen = (ColorRGB)ColorRGBA.DarkOliveGreen;
|
||||||
|
public static readonly ColorRGB DarkOrange = (ColorRGB)ColorRGBA.DarkOrange;
|
||||||
|
public static readonly ColorRGB DarkOrchid = (ColorRGB)ColorRGBA.DarkOrchid;
|
||||||
|
public static readonly ColorRGB DarkRed = (ColorRGB)ColorRGBA.DarkRed;
|
||||||
|
public static readonly ColorRGB DarkSalmon = (ColorRGB)ColorRGBA.DarkSalmon;
|
||||||
|
public static readonly ColorRGB DarkSeaGreen = (ColorRGB)ColorRGBA.DarkSeaGreen;
|
||||||
|
public static readonly ColorRGB DarkSlateBlue = (ColorRGB)ColorRGBA.DarkSlateBlue;
|
||||||
|
public static readonly ColorRGB DarkSlateGray = (ColorRGB)ColorRGBA.DarkSlateGray;
|
||||||
|
public static readonly ColorRGB DarkTurquoise = (ColorRGB)ColorRGBA.DarkTurquoise;
|
||||||
|
public static readonly ColorRGB DarkViolet = (ColorRGB)ColorRGBA.DarkViolet;
|
||||||
|
public static readonly ColorRGB DeepPink = (ColorRGB)ColorRGBA.DeepPink;
|
||||||
|
public static readonly ColorRGB DeepSkyBlue = (ColorRGB)ColorRGBA.DeepSkyBlue;
|
||||||
|
public static readonly ColorRGB DimGray = (ColorRGB)ColorRGBA.DimGray;
|
||||||
|
public static readonly ColorRGB DodgerBlue = (ColorRGB)ColorRGBA.DodgerBlue;
|
||||||
|
public static readonly ColorRGB Firebrick = (ColorRGB)ColorRGBA.Firebrick;
|
||||||
|
public static readonly ColorRGB FloralWhite = (ColorRGB)ColorRGBA.FloralWhite;
|
||||||
|
public static readonly ColorRGB ForestGreen = (ColorRGB)ColorRGBA.ForestGreen;
|
||||||
|
public static readonly ColorRGB Fuchsia = (ColorRGB)ColorRGBA.Fuchsia;
|
||||||
|
public static readonly ColorRGB Gainsboro = (ColorRGB)ColorRGBA.Gainsboro;
|
||||||
|
public static readonly ColorRGB GhostWhite = (ColorRGB)ColorRGBA.GhostWhite;
|
||||||
|
public static readonly ColorRGB Gold = (ColorRGB)ColorRGBA.Gold;
|
||||||
|
public static readonly ColorRGB Goldenrod = (ColorRGB)ColorRGBA.Goldenrod;
|
||||||
|
public static readonly ColorRGB Gray = (ColorRGB)ColorRGBA.Gray;
|
||||||
|
public static readonly ColorRGB Green = (ColorRGB)ColorRGBA.Green;
|
||||||
|
public static readonly ColorRGB GreenYellow = (ColorRGB)ColorRGBA.GreenYellow;
|
||||||
|
public static readonly ColorRGB Honeydew = (ColorRGB)ColorRGBA.Honeydew;
|
||||||
|
public static readonly ColorRGB HotPink = (ColorRGB)ColorRGBA.HotPink;
|
||||||
|
public static readonly ColorRGB IndianRed = (ColorRGB)ColorRGBA.IndianRed;
|
||||||
|
public static readonly ColorRGB Indigo = (ColorRGB)ColorRGBA.Indigo;
|
||||||
|
public static readonly ColorRGB Ivory = (ColorRGB)ColorRGBA.Ivory;
|
||||||
|
public static readonly ColorRGB Khaki = (ColorRGB)ColorRGBA.Khaki;
|
||||||
|
public static readonly ColorRGB Lavender = (ColorRGB)ColorRGBA.Lavender;
|
||||||
|
public static readonly ColorRGB LavenderBlush = (ColorRGB)ColorRGBA.LavenderBlush;
|
||||||
|
public static readonly ColorRGB LawnGreen = (ColorRGB)ColorRGBA.LawnGreen;
|
||||||
|
public static readonly ColorRGB LemonChiffon = (ColorRGB)ColorRGBA.LemonChiffon;
|
||||||
|
public static readonly ColorRGB LightBlue = (ColorRGB)ColorRGBA.LightBlue;
|
||||||
|
public static readonly ColorRGB LightCoral = (ColorRGB)ColorRGBA.LightCoral;
|
||||||
|
public static readonly ColorRGB LightCyan = (ColorRGB)ColorRGBA.LightCyan;
|
||||||
|
public static readonly ColorRGB LightGoldenrodYellow = (ColorRGB)ColorRGBA.LightGoldenrodYellow;
|
||||||
|
public static readonly ColorRGB LightGreen = (ColorRGB)ColorRGBA.LightGreen;
|
||||||
|
public static readonly ColorRGB LightGray = (ColorRGB)ColorRGBA.LightGray;
|
||||||
|
public static readonly ColorRGB LightPink = (ColorRGB)ColorRGBA.LightPink;
|
||||||
|
public static readonly ColorRGB LightSalmon = (ColorRGB)ColorRGBA.LightSalmon;
|
||||||
|
public static readonly ColorRGB LightSeaGreen = (ColorRGB)ColorRGBA.LightSeaGreen;
|
||||||
|
public static readonly ColorRGB LightSkyBlue = (ColorRGB)ColorRGBA.LightSkyBlue;
|
||||||
|
public static readonly ColorRGB LightSlateGray = (ColorRGB)ColorRGBA.LightSlateGray;
|
||||||
|
public static readonly ColorRGB LightSteelBlue = (ColorRGB)ColorRGBA.LightSteelBlue;
|
||||||
|
public static readonly ColorRGB LightYellow = (ColorRGB)ColorRGBA.LightYellow;
|
||||||
|
public static readonly ColorRGB Lime = (ColorRGB)ColorRGBA.Lime;
|
||||||
|
public static readonly ColorRGB LimeGreen = (ColorRGB)ColorRGBA.LimeGreen;
|
||||||
|
public static readonly ColorRGB Linen = (ColorRGB)ColorRGBA.Linen;
|
||||||
|
public static readonly ColorRGB Magenta = (ColorRGB)ColorRGBA.Magenta;
|
||||||
|
public static readonly ColorRGB Maroon = (ColorRGB)ColorRGBA.Maroon;
|
||||||
|
public static readonly ColorRGB MediumAquamarine = (ColorRGB)ColorRGBA.MediumAquamarine;
|
||||||
|
public static readonly ColorRGB MediumBlue = (ColorRGB)ColorRGBA.MediumBlue;
|
||||||
|
public static readonly ColorRGB MediumOrchid = (ColorRGB)ColorRGBA.MediumOrchid;
|
||||||
|
public static readonly ColorRGB MediumPurple = (ColorRGB)ColorRGBA.MediumPurple;
|
||||||
|
public static readonly ColorRGB MediumSeaGreen = (ColorRGB)ColorRGBA.MediumSeaGreen;
|
||||||
|
public static readonly ColorRGB MediumSlateBlue = (ColorRGB)ColorRGBA.MediumSlateBlue;
|
||||||
|
public static readonly ColorRGB MediumSpringGreen = (ColorRGB)ColorRGBA.MediumSpringGreen;
|
||||||
|
public static readonly ColorRGB MediumTurquoise = (ColorRGB)ColorRGBA.MediumTurquoise;
|
||||||
|
public static readonly ColorRGB MediumVioletRed = (ColorRGB)ColorRGBA.MediumVioletRed;
|
||||||
|
public static readonly ColorRGB MidnightBlue = (ColorRGB)ColorRGBA.MidnightBlue;
|
||||||
|
public static readonly ColorRGB MintCream = (ColorRGB)ColorRGBA.MintCream;
|
||||||
|
public static readonly ColorRGB MistyRose = (ColorRGB)ColorRGBA.MistyRose;
|
||||||
|
public static readonly ColorRGB Moccasin = (ColorRGB)ColorRGBA.Moccasin;
|
||||||
|
public static readonly ColorRGB NavajoWhite = (ColorRGB)ColorRGBA.NavajoWhite;
|
||||||
|
public static readonly ColorRGB Navy = (ColorRGB)ColorRGBA.Navy;
|
||||||
|
public static readonly ColorRGB OldLace = (ColorRGB)ColorRGBA.OldLace;
|
||||||
|
public static readonly ColorRGB Olive = (ColorRGB)ColorRGBA.Olive;
|
||||||
|
public static readonly ColorRGB OliveDrab = (ColorRGB)ColorRGBA.OliveDrab;
|
||||||
|
public static readonly ColorRGB Orange = (ColorRGB)ColorRGBA.Orange;
|
||||||
|
public static readonly ColorRGB OrangeRed = (ColorRGB)ColorRGBA.OrangeRed;
|
||||||
|
public static readonly ColorRGB Orchid = (ColorRGB)ColorRGBA.Orchid;
|
||||||
|
public static readonly ColorRGB PaleGoldenrod = (ColorRGB)ColorRGBA.PaleGoldenrod;
|
||||||
|
public static readonly ColorRGB PaleGreen = (ColorRGB)ColorRGBA.PaleGreen;
|
||||||
|
public static readonly ColorRGB PaleTurquoise = (ColorRGB)ColorRGBA.PaleTurquoise;
|
||||||
|
public static readonly ColorRGB PaleVioletRed = (ColorRGB)ColorRGBA.PaleVioletRed;
|
||||||
|
public static readonly ColorRGB PapayaWhip = (ColorRGB)ColorRGBA.PapayaWhip;
|
||||||
|
public static readonly ColorRGB PeachPuff = (ColorRGB)ColorRGBA.PeachPuff;
|
||||||
|
public static readonly ColorRGB Peru = (ColorRGB)ColorRGBA.Peru;
|
||||||
|
public static readonly ColorRGB Pink = (ColorRGB)ColorRGBA.Pink;
|
||||||
|
public static readonly ColorRGB Plum = (ColorRGB)ColorRGBA.Plum;
|
||||||
|
public static readonly ColorRGB PowderBlue = (ColorRGB)ColorRGBA.PowderBlue;
|
||||||
|
public static readonly ColorRGB Purple = (ColorRGB)ColorRGBA.Purple;
|
||||||
|
public static readonly ColorRGB Red = (ColorRGB)ColorRGBA.Red;
|
||||||
|
public static readonly ColorRGB RosyBrown = (ColorRGB)ColorRGBA.RosyBrown;
|
||||||
|
public static readonly ColorRGB RoyalBlue = (ColorRGB)ColorRGBA.RoyalBlue;
|
||||||
|
public static readonly ColorRGB SaddleBrown = (ColorRGB)ColorRGBA.SaddleBrown;
|
||||||
|
public static readonly ColorRGB Salmon = (ColorRGB)ColorRGBA.Salmon;
|
||||||
|
public static readonly ColorRGB SandyBrown = (ColorRGB)ColorRGBA.SandyBrown;
|
||||||
|
public static readonly ColorRGB SeaGreen = (ColorRGB)ColorRGBA.SeaGreen;
|
||||||
|
public static readonly ColorRGB SeaShell = (ColorRGB)ColorRGBA.SeaShell;
|
||||||
|
public static readonly ColorRGB Sienna = (ColorRGB)ColorRGBA.Sienna;
|
||||||
|
public static readonly ColorRGB Silver = (ColorRGB)ColorRGBA.Silver;
|
||||||
|
public static readonly ColorRGB SkyBlue = (ColorRGB)ColorRGBA.SkyBlue;
|
||||||
|
public static readonly ColorRGB SlateBlue = (ColorRGB)ColorRGBA.SlateBlue;
|
||||||
|
public static readonly ColorRGB SlateGray = (ColorRGB)ColorRGBA.SlateGray;
|
||||||
|
public static readonly ColorRGB Snow = (ColorRGB)ColorRGBA.Snow;
|
||||||
|
public static readonly ColorRGB SpringGreen = (ColorRGB)ColorRGBA.SpringGreen;
|
||||||
|
public static readonly ColorRGB SteelBlue = (ColorRGB)ColorRGBA.SteelBlue;
|
||||||
|
public static readonly ColorRGB Tan = (ColorRGB)ColorRGBA.Tan;
|
||||||
|
public static readonly ColorRGB Teal = (ColorRGB)ColorRGBA.Teal;
|
||||||
|
public static readonly ColorRGB Thistle = (ColorRGB)ColorRGBA.Thistle;
|
||||||
|
public static readonly ColorRGB Tomato = (ColorRGB)ColorRGBA.Tomato;
|
||||||
|
public static readonly ColorRGB Transparent = (ColorRGB)ColorRGBA.Transparent;
|
||||||
|
public static readonly ColorRGB Turquoise = (ColorRGB)ColorRGBA.Turquoise;
|
||||||
|
public static readonly ColorRGB Violet = (ColorRGB)ColorRGBA.Violet;
|
||||||
|
public static readonly ColorRGB Wheat = (ColorRGB)ColorRGBA.Wheat;
|
||||||
|
public static readonly ColorRGB White = (ColorRGB)ColorRGBA.White;
|
||||||
|
public static readonly ColorRGB WhiteSmoke = (ColorRGB)ColorRGBA.WhiteSmoke;
|
||||||
|
public static readonly ColorRGB Yellow = (ColorRGB)ColorRGBA.Yellow;
|
||||||
|
public static readonly ColorRGB YellowGreen = (ColorRGB)ColorRGBA.YellowGreen;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The red component of the color.
|
||||||
|
/// </summary>
|
||||||
|
public float R;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The green component of the color.
|
||||||
|
/// </summary>
|
||||||
|
public float G;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The blue component of the color.
|
||||||
|
/// </summary>
|
||||||
|
public float B;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of <see cref="ColorRGB"/> with all components set to 0.
|
||||||
|
/// </summary>
|
||||||
|
public ColorRGB() { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of <see cref="ColorRGB"/> with the specified values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="r">The red component of the color.</param>
|
||||||
|
/// <param name="g">The green component of the color.</param>
|
||||||
|
/// <param name="b">The blue component of the color.</param>
|
||||||
|
public ColorRGB(float r, float g, float b)
|
||||||
|
{
|
||||||
|
R = r;
|
||||||
|
G = g;
|
||||||
|
B = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static explicit operator float3(ColorRGB color) => new float3(color.R, color.G, color.B);
|
||||||
|
public static explicit operator ColorRGB(float3 vector) => new ColorRGB(vector.X, vector.Y, vector.Z);
|
||||||
|
|
||||||
|
public static explicit operator ColorRGBA(ColorRGB color) => new ColorRGBA(color.R, color.G, color.B, 1.0f);
|
||||||
|
public static explicit operator ColorRGB(ColorRGBA color) => new ColorRGB(color.R, color.G, color.B);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Converts a Color from sRGB color space to Linear color space.
|
||||||
|
/// </summary>
|
||||||
|
public static ColorRGB SRgbToLinear(ColorRGB sRGB) => new ColorRGB(pow(sRGB.R, ColorRGBA.SrgbToLin), pow(sRGB.G, ColorRGBA.SrgbToLin), pow(sRGB.B, ColorRGBA.SrgbToLin));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Converts a Color from linear color space to sRGB color space.
|
||||||
|
/// </summary>
|
||||||
|
public static ColorRGB LinearToSRGB(ColorRGB linear) => new ColorRGB(pow(linear.R, ColorRGBA.LinToSRGB), pow(linear.G, ColorRGBA.LinToSRGB), pow(linear.B, ColorRGBA.LinToSRGB));
|
||||||
|
}
|
||||||
@@ -11,6 +11,149 @@ using static GlitchyEngine.Math.Math;
|
|||||||
[StructLayout(LayoutKind.Sequential, Pack=1)]
|
[StructLayout(LayoutKind.Sequential, Pack=1)]
|
||||||
public struct ColorRGBA
|
public struct ColorRGBA
|
||||||
{
|
{
|
||||||
|
// from DirectXColors.h
|
||||||
|
public static readonly ColorRGBA AliceBlue = new( 0.941176534f, 0.972549081f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA AntiqueWhite = new( 0.980392218f, 0.921568692f, 0.843137324f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Aqua = new( 0.000000000f, 1.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Aquamarine = new( 0.498039246f, 1.000000000f, 0.831372619f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Azure = new( 0.941176534f, 1.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Beige = new( 0.960784376f, 0.960784376f, 0.862745166f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Bisque = new( 1.000000000f, 0.894117713f, 0.768627524f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Black = new( 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA BlanchedAlmond = new( 1.000000000f, 0.921568692f, 0.803921640f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Blue = new( 0.000000000f, 0.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA BlueViolet = new( 0.541176498f, 0.168627456f, 0.886274576f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Brown = new( 0.647058845f, 0.164705887f, 0.164705887f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA BurlyWood = new( 0.870588303f, 0.721568644f, 0.529411793f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA CadetBlue = new( 0.372549027f, 0.619607866f, 0.627451003f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Chartreuse = new( 0.498039246f, 1.000000000f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Chocolate = new( 0.823529482f, 0.411764741f, 0.117647067f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Coral = new( 1.000000000f, 0.498039246f, 0.313725501f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA CornflowerBlue = new( 0.392156899f, 0.584313750f, 0.929411829f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Cornsilk = new( 1.000000000f, 0.972549081f, 0.862745166f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Crimson = new( 0.862745166f, 0.078431375f, 0.235294133f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Cyan = new( 0.000000000f, 1.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkBlue = new( 0.000000000f, 0.000000000f, 0.545098066f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkCyan = new( 0.000000000f, 0.545098066f, 0.545098066f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkGoldenrod = new( 0.721568644f, 0.525490224f, 0.043137256f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkGray = new( 0.662745118f, 0.662745118f, 0.662745118f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkGreen = new( 0.000000000f, 0.392156899f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkKhaki = new( 0.741176486f, 0.717647076f, 0.419607878f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkMagenta = new( 0.545098066f, 0.000000000f, 0.545098066f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkOliveGreen = new( 0.333333343f, 0.419607878f, 0.184313729f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkOrange = new( 1.000000000f, 0.549019635f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkOrchid = new( 0.600000024f, 0.196078449f, 0.800000072f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkRed = new( 0.545098066f, 0.000000000f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkSalmon = new( 0.913725555f, 0.588235319f, 0.478431404f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkSeaGreen = new( 0.560784340f, 0.737254918f, 0.545098066f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkSlateBlue = new( 0.282352954f, 0.239215702f, 0.545098066f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkSlateGray = new( 0.184313729f, 0.309803933f, 0.309803933f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkTurquoise = new( 0.000000000f, 0.807843208f, 0.819607913f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DarkViolet = new( 0.580392182f, 0.000000000f, 0.827451050f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DeepPink = new( 1.000000000f, 0.078431375f, 0.576470613f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DeepSkyBlue = new( 0.000000000f, 0.749019623f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DimGray = new( 0.411764741f, 0.411764741f, 0.411764741f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA DodgerBlue = new( 0.117647067f, 0.564705908f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Firebrick = new( 0.698039234f, 0.133333340f, 0.133333340f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA FloralWhite = new( 1.000000000f, 0.980392218f, 0.941176534f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA ForestGreen = new( 0.133333340f, 0.545098066f, 0.133333340f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Fuchsia = new( 1.000000000f, 0.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Gainsboro = new( 0.862745166f, 0.862745166f, 0.862745166f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA GhostWhite = new( 0.972549081f, 0.972549081f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Gold = new( 1.000000000f, 0.843137324f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Goldenrod = new( 0.854902029f, 0.647058845f, 0.125490203f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Gray = new( 0.501960814f, 0.501960814f, 0.501960814f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Green = new( 0.000000000f, 0.501960814f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA GreenYellow = new( 0.678431392f, 1.000000000f, 0.184313729f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Honeydew = new( 0.941176534f, 1.000000000f, 0.941176534f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA HotPink = new( 1.000000000f, 0.411764741f, 0.705882370f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA IndianRed = new( 0.803921640f, 0.360784322f, 0.360784322f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Indigo = new( 0.294117659f, 0.000000000f, 0.509803951f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Ivory = new( 1.000000000f, 1.000000000f, 0.941176534f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Khaki = new( 0.941176534f, 0.901960850f, 0.549019635f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Lavender = new( 0.901960850f, 0.901960850f, 0.980392218f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LavenderBlush = new( 1.000000000f, 0.941176534f, 0.960784376f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LawnGreen = new( 0.486274540f, 0.988235354f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LemonChiffon = new( 1.000000000f, 0.980392218f, 0.803921640f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightBlue = new( 0.678431392f, 0.847058892f, 0.901960850f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightCoral = new( 0.941176534f, 0.501960814f, 0.501960814f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightCyan = new( 0.878431439f, 1.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightGoldenrodYellow = new( 0.980392218f, 0.980392218f, 0.823529482f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightGreen = new( 0.564705908f, 0.933333397f, 0.564705908f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightGray = new( 0.827451050f, 0.827451050f, 0.827451050f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightPink = new( 1.000000000f, 0.713725507f, 0.756862819f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightSalmon = new( 1.000000000f, 0.627451003f, 0.478431404f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightSeaGreen = new( 0.125490203f, 0.698039234f, 0.666666687f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightSkyBlue = new( 0.529411793f, 0.807843208f, 0.980392218f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightSlateGray = new( 0.466666698f, 0.533333361f, 0.600000024f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightSteelBlue = new( 0.690196097f, 0.768627524f, 0.870588303f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LightYellow = new( 1.000000000f, 1.000000000f, 0.878431439f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Lime = new( 0.000000000f, 1.000000000f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA LimeGreen = new( 0.196078449f, 0.803921640f, 0.196078449f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Linen = new( 0.980392218f, 0.941176534f, 0.901960850f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Magenta = new( 1.000000000f, 0.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Maroon = new( 0.501960814f, 0.000000000f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumAquamarine = new( 0.400000036f, 0.803921640f, 0.666666687f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumBlue = new( 0.000000000f, 0.000000000f, 0.803921640f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumOrchid = new( 0.729411781f, 0.333333343f, 0.827451050f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumPurple = new( 0.576470613f, 0.439215720f, 0.858823597f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumSeaGreen = new( 0.235294133f, 0.701960802f, 0.443137288f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumSlateBlue = new( 0.482352972f, 0.407843173f, 0.933333397f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumSpringGreen = new( 0.000000000f, 0.980392218f, 0.603921592f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumTurquoise = new( 0.282352954f, 0.819607913f, 0.800000072f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MediumVioletRed = new( 0.780392230f, 0.082352944f, 0.521568656f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MidnightBlue = new( 0.098039225f, 0.098039225f, 0.439215720f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MintCream = new( 0.960784376f, 1.000000000f, 0.980392218f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA MistyRose = new( 1.000000000f, 0.894117713f, 0.882353008f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Moccasin = new( 1.000000000f, 0.894117713f, 0.709803939f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA NavajoWhite = new( 1.000000000f, 0.870588303f, 0.678431392f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Navy = new( 0.000000000f, 0.000000000f, 0.501960814f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA OldLace = new( 0.992156923f, 0.960784376f, 0.901960850f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Olive = new( 0.501960814f, 0.501960814f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA OliveDrab = new( 0.419607878f, 0.556862772f, 0.137254909f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Orange = new( 1.000000000f, 0.647058845f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA OrangeRed = new( 1.000000000f, 0.270588249f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Orchid = new( 0.854902029f, 0.439215720f, 0.839215755f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA PaleGoldenrod = new( 0.933333397f, 0.909803987f, 0.666666687f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA PaleGreen = new( 0.596078455f, 0.984313786f, 0.596078455f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA PaleTurquoise = new( 0.686274529f, 0.933333397f, 0.933333397f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA PaleVioletRed = new( 0.858823597f, 0.439215720f, 0.576470613f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA PapayaWhip = new( 1.000000000f, 0.937254965f, 0.835294187f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA PeachPuff = new( 1.000000000f, 0.854902029f, 0.725490212f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Peru = new( 0.803921640f, 0.521568656f, 0.247058839f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Pink = new( 1.000000000f, 0.752941251f, 0.796078503f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Plum = new( 0.866666734f, 0.627451003f, 0.866666734f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA PowderBlue = new( 0.690196097f, 0.878431439f, 0.901960850f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Purple = new( 0.501960814f, 0.000000000f, 0.501960814f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Red = new( 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA RosyBrown = new( 0.737254918f, 0.560784340f, 0.560784340f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA RoyalBlue = new( 0.254901975f, 0.411764741f, 0.882353008f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SaddleBrown = new( 0.545098066f, 0.270588249f, 0.074509807f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Salmon = new( 0.980392218f, 0.501960814f, 0.447058856f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SandyBrown = new( 0.956862807f, 0.643137276f, 0.376470625f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SeaGreen = new( 0.180392161f, 0.545098066f, 0.341176480f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SeaShell = new( 1.000000000f, 0.960784376f, 0.933333397f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Sienna = new( 0.627451003f, 0.321568638f, 0.176470593f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Silver = new( 0.752941251f, 0.752941251f, 0.752941251f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SkyBlue = new( 0.529411793f, 0.807843208f, 0.921568692f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SlateBlue = new( 0.415686309f, 0.352941185f, 0.803921640f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SlateGray = new( 0.439215720f, 0.501960814f, 0.564705908f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Snow = new( 1.000000000f, 0.980392218f, 0.980392218f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SpringGreen = new( 0.000000000f, 1.000000000f, 0.498039246f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA SteelBlue = new( 0.274509817f, 0.509803951f, 0.705882370f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Tan = new( 0.823529482f, 0.705882370f, 0.549019635f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Teal = new( 0.000000000f, 0.501960814f, 0.501960814f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Thistle = new( 0.847058892f, 0.749019623f, 0.847058892f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Tomato = new( 1.000000000f, 0.388235331f, 0.278431386f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Transparent = new( 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f );
|
||||||
|
public static readonly ColorRGBA Turquoise = new( 0.250980407f, 0.878431439f, 0.815686345f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Violet = new( 0.933333397f, 0.509803951f, 0.933333397f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Wheat = new( 0.960784376f, 0.870588303f, 0.701960802f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA White = new( 1.000000000f, 1.000000000f, 1.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA WhiteSmoke = new( 0.960784376f, 0.960784376f, 0.960784376f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA Yellow = new( 1.000000000f, 1.000000000f, 0.000000000f, 1.000000000f );
|
||||||
|
public static readonly ColorRGBA YellowGreen = new( 0.603921592f, 0.803921640f, 0.196078449f, 1.000000000f );
|
||||||
|
|
||||||
internal const float SrgbToLin = 2.2f;
|
internal const float SrgbToLin = 2.2f;
|
||||||
internal const float LinToSRGB = (float)(1.0 / 2.2);
|
internal const float LinToSRGB = (float)(1.0 / 2.2);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user