TriEngine
v0.0.16
General-purpose engine in C#/OpenGL
|
Represents an RGBA color that can be used with TriEngine2D. More...
Public Member Functions | |
Color (Color4 color) | |
Creates a new color from a Color4 color. More... | |
Color (Vector3 vector) | |
Creates a new color from a Vector3 vector. More... | |
Color (Vector4 vector) | |
Creates a new color from a Vector4 vector. More... | |
Color (uint value) | |
Creates a new color from an ARGB value. More... | |
Color (Color @base, byte a) | |
Creates a new color from a base color with new alpha value. More... | |
Color (Color @base, float a) | |
Creates a new color from a base color with new alpha value. More... | |
Color (byte r, byte g, byte b, byte a=255) | |
Creates a new color with the specified red, green, blue and alpha values. More... | |
Color (float r, float g, float b, float a=1.0f) | |
Creates a new color with the specified red, green, blue and alpha values. More... | |
uint | ToArgb () |
Converts this color to an ARGB value. More... | |
uint | ToRgba () |
Converts this color to an RGBA value. More... | |
uint | ToBgra () |
Converts this color to an BGRA value. More... | |
uint | ToAbgr () |
Converts this color to an ABGR value. More... | |
Vector3 | ToVector3 () |
Returns a Vector3 representation of this color (ommits alpha value). This can be used with most OpenTK methods. More... | |
Vector4 | ToVector4 () |
Returns a Vector4 representation of this color. This can be used with most OpenTK methods. More... | |
Color4 | ToColor4 () |
Returns a Color4 representation of this color. This can be used with most OpenTK methods. More... | |
Static Public Member Functions | |
static Color | FromRgba (uint value) |
Creates a new Color from an RGBA value. More... | |
static Color | FromBgra (uint value) |
Creates a new Color from a BGRA value. More... | |
static Color | FromAbgr (uint value) |
Creates a new Color from an ABGR value. More... | |
Public Attributes | |
readonly float | R |
The red component of the color. More... | |
readonly float | G |
The green component of the color. More... | |
readonly float | B |
The blue component of the color. More... | |
readonly float | A |
The color's alpha value. More... | |
Static Public Attributes | |
static readonly Color | AliceBlue = new Color(240, 248, 255) |
The color AliceBlue. More... | |
static readonly Color | AntiqueWhite = new Color(250, 235, 215) |
The color AntiqueWhite. More... | |
static readonly Color | Aqua = new Color(0, 255, 255) |
The color Aqua. More... | |
static readonly Color | Aquamarine = new Color(127, 255, 212) |
The color Aquamarine. More... | |
static readonly Color | Azure = new Color(240, 255, 255) |
The color Azure. More... | |
static readonly Color | Beige = new Color(245, 245, 220) |
The color Beige. More... | |
static readonly Color | Bisque = new Color(255, 228, 196) |
The color Bisque. More... | |
static readonly Color | Black = new Color(0, 0, 0) |
The color Black. More... | |
static readonly Color | BlanchedAlmond = new Color(255, 235, 205) |
The color BlanchedAlmond. More... | |
static readonly Color | Blue = new Color(0, 0, 255) |
The color Blue. More... | |
static readonly Color | BlueViolet = new Color(138, 43, 226) |
The color BlueViolet. More... | |
static readonly Color | Brown = new Color(165, 42, 42) |
The color Brown. More... | |
static readonly Color | BurlyWood = new Color(222, 184, 135) |
The color BurlyWood. More... | |
static readonly Color | CadetBlue = new Color(95, 158, 160) |
The color CadetBlue. More... | |
static readonly Color | Chartreuse = new Color(127, 255, 0) |
The color Chartreuse. More... | |
static readonly Color | Chocolate = new Color(210, 105, 30) |
The color Chocolate. More... | |
static readonly Color | Coral = new Color(255, 127, 80) |
The color Coral. More... | |
static readonly Color | CornflowerBlue = new Color(100, 149, 237) |
The color CornflowerBlue. More... | |
static readonly Color | Cornsilk = new Color(255, 248, 220) |
The color Cornsilk. More... | |
static readonly Color | Crimson = new Color(220, 20, 60) |
The color Crimson. More... | |
static readonly Color | Cyan = new Color(0, 255, 255) |
The color Cyan. More... | |
static readonly Color | DarkBlue = new Color(0, 0, 139) |
The color DarkBlue. More... | |
static readonly Color | DarkCyan = new Color(0, 139, 139) |
The color DarkCyan. More... | |
static readonly Color | DarkGoldenrod = new Color(184, 134, 11) |
The color DarkGoldenrod. More... | |
static readonly Color | DarkGray = new Color(169, 169, 169) |
The color DarkGray. More... | |
static readonly Color | DarkGreen = new Color(0, 100, 0) |
The color DarkGreen. More... | |
static readonly Color | DarkKhaki = new Color(189, 183, 107) |
The color DarkKhaki. More... | |
static readonly Color | DarkMagenta = new Color(139, 0, 139) |
The color DarkMagenta. More... | |
static readonly Color | DarkOliveGreen = new Color(85, 107, 47) |
The color DarkOliveGreen. More... | |
static readonly Color | DarkOrange = new Color(255, 140, 0) |
The color DarkOrange. More... | |
static readonly Color | DarkOrchid = new Color(153, 50, 204) |
The color DarkOrchid. More... | |
static readonly Color | DarkRed = new Color(139, 0, 0) |
The color DarkRed. More... | |
static readonly Color | DarkSalmon = new Color(233, 150, 122) |
The color DarkSalmon. More... | |
static readonly Color | DarkSeaGreen = new Color(143, 188, 139) |
The color DarkSeaGreen. More... | |
static readonly Color | DarkSlateBlue = new Color(72, 61, 139) |
The color DarkSlateBlue. More... | |
static readonly Color | DarkSlateGray = new Color(47, 79, 79) |
The color DarkSlateGray. More... | |
static readonly Color | DarkTurquoise = new Color(0, 206, 209) |
The color DarkTurquoise. More... | |
static readonly Color | DarkViolet = new Color(148, 0, 211) |
The color DarkViolet. More... | |
static readonly Color | DeepPink = new Color(255, 20, 147) |
The color DeepPink. More... | |
static readonly Color | DeepSkyBlue = new Color(0, 191, 255) |
The color DeepSkyBlue. More... | |
static readonly Color | DimGray = new Color(105, 105, 105) |
The color DimGray. More... | |
static readonly Color | DodgerBlue = new Color(30, 144, 255) |
The color DodgerBlue. More... | |
static readonly Color | Firebrick = new Color(178, 34, 34) |
The color Firebrick. More... | |
static readonly Color | FloralWhite = new Color(255, 250, 240) |
The color FloralWhite. More... | |
static readonly Color | ForestGreen = new Color(34, 139, 34) |
The color ForestGreen. More... | |
static readonly Color | Fuchsia = new Color(255, 0, 255) |
The color Fuchsia. More... | |
static readonly Color | Gainsboro = new Color(220, 220, 220) |
The color Gainsboro. More... | |
static readonly Color | GhostWhite = new Color(248, 248, 255) |
The color GhostWhite. More... | |
static readonly Color | Gold = new Color(255, 215, 0) |
The color Gold. More... | |
static readonly Color | Goldenrod = new Color(218, 165, 32) |
The color Goldenrod. More... | |
static readonly Color | Gray = new Color(128, 128, 128) |
The color Gray. More... | |
static readonly Color | Green = new Color(0, 128, 0) |
The color Green. More... | |
static readonly Color | GreenYellow = new Color(173, 255, 47) |
The color GreenYellow. More... | |
static readonly Color | HoneyDew = new Color(240, 255, 240) |
The color HoneyDew. More... | |
static readonly Color | HotPink = new Color(255, 105, 180) |
The color HotPink. More... | |
static readonly Color | IndianRed = new Color(205, 92, 92) |
The color IndianRed. More... | |
static readonly Color | Indigo = new Color(75, 0, 130) |
The color Indigo. More... | |
static readonly Color | Ivory = new Color(255, 255, 240) |
The color Ivory. More... | |
static readonly Color | Khaki = new Color(240, 230, 140) |
The color Khaki. More... | |
static readonly Color | Lavender = new Color(230, 230, 250) |
The color Lavender. More... | |
static readonly Color | LavenderBlush = new Color(255, 240, 245) |
The color LavenderBlush. More... | |
static readonly Color | LawnGreen = new Color(124, 252, 0) |
The color LawnGreen. More... | |
static readonly Color | LemonChiffon = new Color(255, 250, 205) |
The color LemonChiffon. More... | |
static readonly Color | LightBlue = new Color(173, 216, 230) |
The color LightBlue. More... | |
static readonly Color | LightCoral = new Color(240, 128, 128) |
The color LightCoral. More... | |
static readonly Color | LightCyan = new Color(224, 255, 255) |
The color LightCyan. More... | |
static readonly Color | LightGoldenrodYellow = new Color(250, 250, 210) |
The color LightGoldenrodYellow. More... | |
static readonly Color | LightGray = new Color(211, 211, 211) |
The color LightGray. More... | |
static readonly Color | LightGreen = new Color(144, 238, 144) |
The color LightGreen. More... | |
static readonly Color | LightPink = new Color(255, 182, 193) |
The color LightPink. More... | |
static readonly Color | LightSalmon = new Color(255, 160, 122) |
The color LightSalmon. More... | |
static readonly Color | LightSeaGreen = new Color(32, 178, 170) |
The color LightSeaGreen. More... | |
static readonly Color | LightSkyBlue = new Color(135, 206, 250) |
The color LightSkyBlue. More... | |
static readonly Color | LightSlateGray = new Color(119, 136, 153) |
The color LightSlateGray. More... | |
static readonly Color | LightSteelBlue = new Color(176, 196, 222) |
The color LightSteelBlue. More... | |
static readonly Color | LightYellow = new Color(255, 255, 224) |
The color LightYellow. More... | |
static readonly Color | Lime = new Color(0, 255, 0) |
The color Lime. More... | |
static readonly Color | LimeGreen = new Color(50, 205, 50) |
The color LimeGreen. More... | |
static readonly Color | Linen = new Color(250, 240, 230) |
The color Linen. More... | |
static readonly Color | Magenta = new Color(255, 0, 255) |
The color Magenta. More... | |
static readonly Color | Maroon = new Color(128, 0, 0) |
The color Maroon. More... | |
static readonly Color | MediumAquamarine = new Color(102, 205, 170) |
The color MediumAquamarine. More... | |
static readonly Color | MediumBlue = new Color(0, 0, 205) |
The color MediumBlue. More... | |
static readonly Color | MediumOrchid = new Color(186, 85, 211) |
The color MediumOrchid. More... | |
static readonly Color | MediumPurple = new Color(147, 112, 219) |
The color MediumPurple. More... | |
static readonly Color | MediumSeaGreen = new Color(60, 179, 113) |
The color MediumSeaGreen. More... | |
static readonly Color | MediumSlateBlue = new Color(123, 104, 238) |
The color MediumSlateBlue. More... | |
static readonly Color | MediumSpringGreen = new Color(0, 250, 154) |
The color MediumSpringGreen. More... | |
static readonly Color | MediumTurquoise = new Color(72, 209, 204) |
The color MediumTurquoise. More... | |
static readonly Color | MediumVioletRed = new Color(199, 21, 133) |
The color MediumVioletRed. More... | |
static readonly Color | MidnightBlue = new Color(25, 25, 112) |
The color MidnightBlue. More... | |
static readonly Color | MintCream = new Color(245, 255, 250) |
The color MintCream. More... | |
static readonly Color | MistyRose = new Color(255, 228, 225) |
The color MistyRose. More... | |
static readonly Color | Moccasin = new Color(255, 228, 181) |
The color Moccasin. More... | |
static readonly Color | NavajoWhite = new Color(255, 222, 173) |
The color NavajoWhite. More... | |
static readonly Color | Navy = new Color(0, 0, 128) |
The color Navy. More... | |
static readonly Color | OldLace = new Color(253, 245, 230) |
The color OldLace. More... | |
static readonly Color | Olive = new Color(128, 128, 0) |
The color Olive. More... | |
static readonly Color | OliveDrab = new Color(107, 142, 35) |
The color OliveDrab. More... | |
static readonly Color | Orange = new Color(255, 165, 0) |
The color Orange. More... | |
static readonly Color | OrangeRed = new Color(255, 69, 0) |
The color OrangeRed. More... | |
static readonly Color | Orchid = new Color(218, 112, 214) |
The color Orchid. More... | |
static readonly Color | PaleGoldenrod = new Color(238, 232, 170) |
The color PaleGoldenrod. More... | |
static readonly Color | PaleGreen = new Color(152, 251, 152) |
The color PaleGreen. More... | |
static readonly Color | PaleTurquoise = new Color(175, 238, 238) |
The color PaleTurquoise. More... | |
static readonly Color | PaleVioletRed = new Color(219, 112, 147) |
The color PaleVioletRed. More... | |
static readonly Color | PapayaWhip = new Color(225, 239, 213) |
The color PapayaWhip. More... | |
static readonly Color | PeachPuff = new Color(255, 218, 185) |
The color PeachPuff. More... | |
static readonly Color | Peru = new Color(205, 133, 63) |
The color Peru. More... | |
static readonly Color | Pink = new Color(255, 192, 203) |
The color Pink. More... | |
static readonly Color | Plum = new Color(221, 160, 221) |
The color Plum. More... | |
static readonly Color | PowderBlue = new Color(176, 224, 230) |
The color PowderBlue. More... | |
static readonly Color | Purple = new Color(128, 0, 128) |
The color Purple. More... | |
static readonly Color | Red = new Color(255, 0, 0) |
The color Red. More... | |
static readonly Color | RosyBrown = new Color(188, 143, 143) |
The color RosyBrown. More... | |
static readonly Color | RoyalBlue = new Color(65, 105, 225) |
The color RoyalBlue. More... | |
static readonly Color | SaddleBrown = new Color(139, 69, 19) |
The color SaddleBrown. More... | |
static readonly Color | Salmon = new Color(250, 128, 114) |
The color Salmon. More... | |
static readonly Color | SandyBrown = new Color(244, 164, 96) |
The color SandyBrown. More... | |
static readonly Color | SeaGreen = new Color(46, 139, 87) |
The color SeaGreen. More... | |
static readonly Color | SeaShell = new Color(255, 245, 238) |
The color SeaShell. More... | |
static readonly Color | Sienna = new Color(160, 82, 45) |
The color Sienna. More... | |
static readonly Color | Silver = new Color(192, 192, 192) |
The color Silver. More... | |
static readonly Color | SkyBlue = new Color(135, 206, 235) |
The color SkyBlue. More... | |
static readonly Color | SlateBlue = new Color(106, 90, 205) |
The color SlateBlue. More... | |
static readonly Color | SlateGray = new Color(112, 128, 144) |
The color SlateGray. More... | |
static readonly Color | Snow = new Color(255, 250, 250) |
The color Snow. More... | |
static readonly Color | SpringGreen = new Color(0, 255, 127) |
The color SpringGreen. More... | |
static readonly Color | SteelBlue = new Color(70, 130, 180) |
The color SteelBlue. More... | |
static readonly Color | Tan = new Color(210, 180, 140) |
The color Tan. More... | |
static readonly Color | Teal = new Color(0, 128, 128) |
The color Teal. More... | |
static readonly Color | Thistle = new Color(216, 191, 216) |
The color Thistle. More... | |
static readonly Color | Tomato = new Color(255, 99, 71) |
The color Tomato. More... | |
static readonly Color | TransparentBlack = new Color(0, 0, 0, 0) |
Transparent black color. More... | |
static readonly Color | TransparentWhite = new Color(255, 255, 255, 0) |
Transparent white color. More... | |
static readonly Color | Turquoise = new Color(64, 224, 208) |
The color Turquoise. More... | |
static readonly Color | Violet = new Color(238, 130, 238) |
The color Violet. More... | |
static readonly Color | Wheat = new Color(245, 222, 179) |
The color Wheat. More... | |
static readonly Color | White = new Color(255, 255, 255) |
The color White. More... | |
static readonly Color | WhiteSmoke = new Color(245, 245, 245) |
The color WhiteSmoke. More... | |
static readonly Color | Yellow = new Color(255, 255, 0) |
The color Yellow. More... | |
static readonly Color | YellowGreen = new Color(154, 205, 50) |
The color YellowGreen. More... | |
Represents an RGBA color that can be used with TriEngine2D.
TriDevs.TriEngine.Color.Color | ( | Color4 | color | ) |
TriDevs.TriEngine.Color.Color | ( | Vector3 | vector | ) |
TriDevs.TriEngine.Color.Color | ( | Vector4 | vector | ) |
TriDevs.TriEngine.Color.Color | ( | uint | value | ) |
Creates a new color from an ARGB value.
value | The ARGB value to create the color from. |
The format of the ARGB value is expected to be 0xAARRGGBB
.
TriDevs.TriEngine.Color.Color | ( | Color @ | base, |
byte | a | ||
) |
TriDevs.TriEngine.Color.Color | ( | Color @ | base, |
float | a | ||
) |
TriDevs.TriEngine.Color.Color | ( | byte | r, |
byte | g, | ||
byte | b, | ||
byte | a = 255 |
||
) |
Creates a new color with the specified red, green, blue and alpha values.
r | Value of the red component (0-255). |
g | Value of the green component (0-255). |
b | Value of the blue component (0-255). |
a | Alpha value (0-255) where 0 is transparent and 255 is opaque. |
TriDevs.TriEngine.Color.Color | ( | float | r, |
float | g, | ||
float | b, | ||
float | a = 1.0f |
||
) |
Creates a new color with the specified red, green, blue and alpha values.
r | Value of the red component (0.0-1.0). |
g | Value of the green component (0.0-1.0). |
b | Value of the blue component (0.0-1.0). |
a | Alpha value (0.0-1.0) where 0.0 is transparent and 1.0 is opauqe. |
|
static |
|
static |
|
static |
uint TriDevs.TriEngine.Color.ToAbgr | ( | ) |
Converts this color to an ABGR value.
The format of the ABGR value is 0xAABBGGRR
.
uint TriDevs.TriEngine.Color.ToArgb | ( | ) |
Converts this color to an ARGB value.
The format of the ARGB value is 0xAARRGGBB
.
uint TriDevs.TriEngine.Color.ToBgra | ( | ) |
Converts this color to an BGRA value.
The format of the BGRA value is 0xBBGGRRAA
.
Color4 TriDevs.TriEngine.Color.ToColor4 | ( | ) |
uint TriDevs.TriEngine.Color.ToRgba | ( | ) |
Converts this color to an RGBA value.
The format of the RGBA value is 0xRRGGBBAA
.
Vector3 TriDevs.TriEngine.Color.ToVector3 | ( | ) |
Vector4 TriDevs.TriEngine.Color.ToVector4 | ( | ) |
readonly float TriDevs.TriEngine.Color.A |
The color's alpha value.
The color AliceBlue.
The color AntiqueWhite.
The color Aquamarine.
readonly float TriDevs.TriEngine.Color.B |
The blue component of the color.
The color BlanchedAlmond.
The color BlueViolet.
The color BurlyWood.
The color CadetBlue.
The color Chartreuse.
The color Chocolate.
The color CornflowerBlue.
The color Cornsilk.
The color DarkGoldenrod.
The color DarkGray.
The color DarkKhaki.
The color DarkMagenta.
The color DarkOliveGreen.
The color DarkOrange.
The color DarkOrchid.
The color DarkSalmon.
The color DarkSeaGreen.
The color DarkSlateBlue.
The color DarkSlateGray.
The color DarkTurquoise.
The color DarkViolet.
The color DeepPink.
The color DeepSkyBlue.
The color DodgerBlue.
The color Firebrick.
The color FloralWhite.
The color ForestGreen.
readonly float TriDevs.TriEngine.Color.G |
The green component of the color.
The color Gainsboro.
The color GhostWhite.
The color Goldenrod.
The color GreenYellow.
The color HoneyDew.
The color IndianRed.
The color Lavender.
The color LavenderBlush.
The color LawnGreen.
The color LemonChiffon.
The color LightBlue.
The color LightCoral.
The color LightCyan.
The color LightGoldenrodYellow.
The color LightGray.
The color LightGreen.
The color LightPink.
The color LightSalmon.
The color LightSeaGreen.
The color LightSkyBlue.
The color LightSlateGray.
The color LightSteelBlue.
The color LightYellow.
The color LimeGreen.
The color MediumAquamarine.
The color MediumBlue.
The color MediumOrchid.
The color MediumPurple.
The color MediumSeaGreen.
The color MediumSlateBlue.
The color MediumSpringGreen.
The color MediumTurquoise.
The color MediumVioletRed.
The color MidnightBlue.
The color MintCream.
The color MistyRose.
The color Moccasin.
The color NavajoWhite.
The color OliveDrab.
The color OrangeRed.
The color PaleGoldenrod.
The color PaleGreen.
The color PaleTurquoise.
The color PaleVioletRed.
The color PapayaWhip.
The color PeachPuff.
The color PowderBlue.
readonly float TriDevs.TriEngine.Color.R |
The red component of the color.
The color RosyBrown.
The color RoyalBlue.
The color SaddleBrown.
The color SandyBrown.
The color SeaShell.
The color SlateBlue.
The color SlateGray.
The color SpringGreen.
The color SteelBlue.
Transparent black color.
Transparent white color.
The color Turquoise.
The color WhiteSmoke.
The color YellowGreen.