Defines a color using red, green, blue, and alpha values. The standard
range for each component is [0f, 1f].
Declaration Syntax
C# |
[SerializableAttribute] public struct Color : IEquatable<Color>
Members
All Members | Constructors | Methods | Properties | Fields | |
|
|
|
Icon | Member | Description |
---|---|---|
Color(UInt32) |
Creates a new instance of Color from a packed int containing all four components.
|
|
Color(Int32, Int32, Int32) |
Creates a new instance of Color from RGBA byte values with range 0-255. If
the component values are greater than 255 or less than 0, they will be clamped
to the range 0-255.
|
|
Color(Int32, Int32, Int32, Int32) |
Creates a new instance of Color from RGBA byte values with range 0-255. If
the component values are greater than 255 or less than 0, they will be clamped
to the range 0-255.
|
|
Color(Single, Single, Single) |
Creates a new instance of Color. Alpha is set to 1.0f.
|
|
Color(Single, Single, Single, Single) |
Creates a new instance of Color.
|
|
Color(Vector3) |
Creates a new instance of Color. Alpha is set to 1.0f.
|
|
Color(Vector3, Single) |
Creates a new instance of Color.
|
|
Color(Vector4) |
Creates a new instance of Color.
|
|
A |
Alpha component
|
|
Add(Color, Color) |
Adds two colors together.
|
|
Add(Color%, Color%, Color%) |
Adds two colors together.
|
|
Addition(Color, Color) |
Adds the two colors together.
|
|
AdjustContrast(Color, Single) |
Adjusts the contrast of the color. If the contrast is 0, the color is 50% gray
and if its 1 the original color is returned.
|
|
AdjustContrast(Color%, Single, Color%) |
Adjusts the contrast of the color. If the contrast is 0, the color is 50% gray
and if its 1 the original color is returned.
|
|
AdjustSaturation(Color, Single) |
Adjusts the saturation of the color. If the saturation is 0, then the grayscale
color is chosen and if its 1, then the original color is returned.
|
|
AdjustSaturation(Color%, Single, Color%) |
Adjusts the saturation of the color. If the saturation is 0, then the grayscale
color is chosen and if its 1, then the original color is returned.
|
|
AliceBlue |
Gets a color with the index R:240 G:248 B:255 A:255.
|
|
AntiqueWhite |
Gets a color with the index R:250 G:235 B:215 A:255.
|
|
Aqua |
Gets a color with the index R:0 G:255 B:255 A:255.
|
|
Aquamarine |
Gets a color with the index R:127 G:255 B:212 A:255.
|
|
Azure |
Gets a color with the index R:240 G:255 B:255 A:255.
|
|
B |
Blue component
|
|
Beige |
Gets a color with the index R:245 G:245 B:220 A:255.
|
|
Bisque |
Gets a color with the index R:255 G:228 B:196 A:255.
|
|
Black |
Gets a color with the index R:0 G:0 B:0 A:255.
|
|
BlanchedAlmond |
Gets a color with the index R:255 G:235 B:205 A:255.
|
|
Blue |
Gets a color with the index R:0 G:0 B:255 A:255.
|
|
BlueViolet |
Gets a color with the index R:138 G:43 B:226 A:255.
|
|
Brown |
Gets a color with the index R:165 G:42 B:42 A:255.
|
|
BurlyWood |
Gets a color with the index R:222 G:184 B:135 A:255.
|
|
CadetBlue |
Gets a color with the index R:95 G:158 B:160 A:255.
|
|
Chartreuse |
Gets a color with the index R:127 G:255 B:0 A:255.
|
|
Chocolate |
Gets a color with the index R:210 G:105 B:30 A:255.
|
|
Coral |
Gets a color with the index R:255 G:127 B:80 A:255.
|
|
CornflowerBlue |
Gets a color with the index R:100 G:149 B:237 A:255.
|
|
Cornsilk |
Gets a color with the index R:255 G:248 B:220 A:255.
|
|
Crimson |
Gets a color with the index R:220 G:20 B:60 A:255.
|
|
Cyan |
Gets a color with the index R:0 G:255 B:255 A:255.
|
|
DarkBlue |
Gets a color with the index R:0 G:0 B:139 A:255.
|
|
DarkCyan |
Gets a color with the index R:0 G:139 B:139 A:255.
|
|
DarkGoldenrod |
Gets a color with the index R:184 G:134 B:11 A:255.
|
|
DarkGray |
Gets a color with the index R:169 G:169 B:169 A:255.
|
|
DarkGreen |
Gets a color with the index R:0 G:100 B:0 A:255.
|
|
DarkKhaki |
Gets a color with the index R:189 G:183 B:107 A:255.
|
|
DarkMagenta |
Gets a color with the index R:139 G:0 B:139 A:255.
|
|
DarkOliveGreen |
Gets a color with the index R:85 G:107 B:47 A:255.
|
|
DarkOrange |
Gets a color with the index R:255 G:140 B:0 A:255.
|
|
DarkOrchid |
Gets a color with the index R:153 G:50 B:204 A:255.
|
|
DarkRed |
Gets a color with the index R:139 G:0 B:0 A:255.
|
|
DarkSalmon |
Gets a color with the index R:233 G:150 B:122 A:255.
|
|
DarkSeaGreen |
Gets a color with the index R:143 G:188 B:139 A:255.
|
|
DarkSlateBlue |
Gets a color with the index R:72 G:61 B:139 A:255.
|
|
DarkSlateGray |
Gets a color with the index R:47 G:79 B:79 A:255.
|
|
DarkTurquoise |
Gets a color with the index R:0 G:206 B:209 A:255.
|
|
DarkViolet |
Gets a color with the index R:148 G:0 B:211 A:255.
|
|
DeepPink |
Gets a color with the index R:255 G:20 B:147 A:255.
|
|
DeepSkyBlue |
Gets a color with the index R:0 G:191 B:255 A:255.
|
|
DimGray |
Gets a color with the index R:105 G:105 B:105 A:255.
|
|
DodgerBlue |
Gets a color with the index R:30 G:144 B:255 A:255.
|
|
Equality(Color, Color) |
Tests equality between two colors.
|
|
Equals(Color) |
Tests equality between this color and another color.
|
|
Equals(Object) |
Tests equality between this color and the supplied object.
(Overrides ValueType.Equals(Object).) |
|
Firebrick |
Gets a color with the index R:178 G:34 B:34 A:255.
|
|
FloralWhite |
Gets a color with the index R:255 G:250 B:240 A:255.
|
|
ForestGreen |
Gets a color with the index R:34 G:139 B:34 A:255.
|
|
Fuchsia |
Gets a color with the index R:255 G:0 B:255 A:255.
|
|
G |
Green component
|
|
Gainsboro |
Gets a color with the index R:220 G:220 B:220 A:255.
|
|
GetHashCode()()()() |
Get the object's hash code.
(Overrides ValueType.GetHashCode()()()().) |
|
GetType()()()() |
Gets the Type of the current instance. (Inherited from Object.) |
|
GhostWhite |
Gets a color with the index R:248 G:248 B:255 A:255.
|
|
Gold |
Gets a color with the index R:255 G:215 B:0 A:255.
|
|
Goldenrod |
Gets a color with the index R:218 G:165 B:32 A:255.
|
|
Gray |
Gets a color with the index R:128 G:128 B:128 A:255.
|
|
Green |
Gets a color with the index R:0 G:128 B:0 A:255.
|
|
GreenYellow |
Gets a color with the index R:173 G:255 B:47 A:255.
|
|
Honeydew |
Gets a color with the index R:240 G:255 B:240 A:255.
|
|
HotPink |
Gets a color with the index R:255 G:105 B:180 A:255.
|
|
IndianRed |
Gets a color with the index R:205 G:92 B:92 A:255.
|
|
Indigo |
Gets a color with the index R:75 G:0 B:130 A:255.
|
|
Inequality(Color, Color) |
Tests inequality between two colors.
|
|
Ivory |
Gets a color with the index R:255 G:255 B:240 A:255.
|
|
Khaki |
Gets a color with the index R:240 G:230 B:140 A:255.
|
|
Lavender |
Gets a color with the index R:230 G:230 B:250 A:255.
|
|
LavenderBlush |
Gets a color with the index R:255 G:240 B:245 A:255.
|
|
LawnGreen |
Gets a color with the index R:124 G:252 B:0 A:255.
|
|
LemonChiffon |
Gets a color with the index R:255 G:250 B:205 A:255.
|
|
Lerp(Color, Color, Single) |
Linearly interpolates between two colors.
|
|
Lerp(Color%, Color%, Single, Color%) |
Linearly interpolates between two colors.
|
|
LightBlue |
Gets a color with the index R:173 G:216 B:230 A:255.
|
|
LightCoral |
Gets a color with the index R:240 G:128 B:128 A:255.
|
|
LightCyan |
Gets a color with the index R:224 G:255 B:255 A:255.
|
|
LightGoldenrodYellow |
Gets a color with the index R:250 G:250 B:210 A:255.
|
|
LightGray |
Gets a color with the index R:211 G:211 B:211 A:255.
|
|
LightGreen |
Gets a color with the index R:144 G:238 B:144 A:255.
|
|
LightPink |
Gets a color with the index R:255 G:182 B:193 A:255.
|
|
LightSalmon |
Gets a color with the index R:255 G:160 B:122 A:255.
|
|
LightSeaGreen |
Gets a color with the index R:32 G:178 B:170 A:255.
|
|
LightSkyBlue |
Gets a color with the index R:135 G:206 B:250 A:255.
|
|
LightSlateGray |
Gets a color with the index R:119 G:136 B:153 A:255.
|
|
LightSteelBlue |
Gets a color with the index R:176 G:196 B:222 A:255.
|
|
LightYellow |
Gets a color with the index R:255 G:255 B:224 A:255.
|
|
Lime |
Gets a color with the index R:0 G:255 B:0 A:255.
|
|
LimeGreen |
Gets a color with the index R:50 G:205 B:50 A:255.
|
|
Linen |
Gets a color with the index R:250 G:240 B:230 A:255.
|
|
Magenta |
Gets a color with the index R:255 G:0 B:255 A:255.
|
|
Maroon |
Gets a color with the index R:128 G:0 B:0 A:255.
|
|
MediumAquamarine |
Gets a color with the index R:102 G:205 B:170 A:255.
|
|
MediumBlue |
Gets a color with the index R:0 G:0 B:205 A:255.
|
|
MediumOrchid |
Gets a color with the index R:186 G:85 B:211 A:255.
|
|
MediumPurple |
Gets a color with the index R:147 G:112 B:219 A:255.
|
|
MediumSeaGreen |
Gets a color with the index R:60 G:179 B:113 A:255.
|
|
MediumSlateBlue |
Gets a color with the index R:123 G:104 B:238 A:255.
|
|
MediumSpringGreen |
Gets a color with the index R:0 G:250 B:154 A:255.
|
|
MediumTurquoise |
Gets a color with the index R:72 G:209 B:204 A:255.
|
|
MediumVioletRed |
Gets a color with the index R:199 G:21 B:133 A:255.
|
|
MidnightBlue |
Gets a color with the index R:25 G:25 B:112 A:255.
|
|
MintCream |
Gets a color with the index R:245 G:255 B:250 A:255.
|
|
MistyRose |
Gets a color with the index R:255 G:228 B:225 A:255.
|
|
Moccasin |
Gets a color with the index R:255 G:228 B:181 A:255.
|
|
Modulate(Color, Color) |
Modulates two colors together.
|
|
Modulate(Color%, Color%, Color%) |
Modulates two colors together.
|
|
Multiply(Color, Color) |
Modulates two colors together.
|
|
Multiply(Color, Single) |
Scales a color by a scaling factor.
|
|
Multiply(Single, Color) |
Scales a color by a scaling factor.
|
|
NavajoWhite |
Gets a color with the index R:255 G:222 B:173 A:255.
|
|
Navy |
Gets a color with the index R:0 G:0 B:128 A:255.
|
|
Negate()()()() |
Negates this color by subtracting each of its components from 1.0f.
|
|
Negate(Color) |
Negates the specified color by subtracting each of its components from 1.0f.
|
|
Negate(Color%, Color%) |
Negates the specified color by subtracting each of its components from 1.0f.
|
|
OldLace |
Gets a color with the index R:253 G:245 B:230 A:255.
|
|
Olive |
Gets a color with the index R:128 G:128 B:0 A:255.
|
|
OliveDrab |
Gets a color with the index R:107 G:142 B:35 A:255.
|
|
Orange |
Gets a color with the index R:255 G:165 B:0 A:255.
|
|
OrangeRed |
Gets a color with the index R:255 G:69 B:0 A:255.
|
|
Orchid |
Gets a color with the index R:218 G:112 B:214 A:255.
|
|
PackedValue |
Unsigned integer representing the color index.
|
|
PaleGoldenrod |
Gets a color with the index R:238 G:232 B:170 A:255.
|
|
PaleGreen |
Gets a color with the index R:152 G:251 B:152 A:255.
|
|
PaleTurquoise |
Gets a color with the index R:175 G:238 B:238 A:255.
|
|
PaleVioletRed |
Gets a color with the index R:219 G:112 B:147 A:255.
|
|
PapayaWhip |
Gets a color with the index R:255 G:239 B:213 A:255.
|
|
PeachPuff |
Gets a color with the index R:255 G:218 B:185 A:255.
|
|
Peru |
Gets a color with the index R:205 G:133 B:63 A:255.
|
|
Pink |
Gets a color with the index R:255 G:192 B:203 A:255.
|
|
Plum |
Gets a color with the index R:221 G:160 B:221 A:255.
|
|
PowderBlue |
Gets a color with the index R:176 G:224 B:230 A:255.
|
|
Purple |
Gets a color with the index R:128 G:0 B:128 A:255.
|
|
R |
Red component
|
|
Red |
Gets a color with the index R:255 G:0 B:0 A:255.
|
|
RosyBrown |
Gets a color with the index R:188 G:143 B:143 A:255.
|
|
RoyalBlue |
Gets a color with the index R:65 G:105 B:225 A:255.
|
|
SaddleBrown |
Gets a color with the index R:139 G:69 B:19 A:255.
|
|
Salmon |
Gets a color with the index R:250 G:128 B:114 A:255.
|
|
SandyBrown |
Gets a color with the index R:244 G:164 B:96 A:255.
|
|
Scale(Color, Single) |
Scales a color by a scaling factor.
|
|
Scale(Color%, Single, Color%) |
Scales a color by a scaling factor.
|
|
SeaGreen |
Gets a color with the index R:46 G:139 B:87 A:255.
|
|
SeaShell |
Gets a color with the index R:255 G:245 B:238 A:255.
|
|
SetRGBA(Single, Single, Single, Single) |
Set the packed color index from four floats.
|
|
Sienna |
Gets a color with the index R:160 G:82 B:45 A:255.
|
|
Silver |
Gets a color with the index R:192 G:192 B:192 A:255.
|
|
SizeInBytes |
Gets the Color struct's size in bytes.
|
|
SkyBlue |
Gets a color with the index R:135 G:206 B:235 A:255.
|
|
SlateBlue |
Gets a color with the index R:106 G:90 B:205 A:255.
|
|
SlateGray |
Gets a color with the index R:112 G:128 B:144 A:255.
|
|
Snow |
Gets a color with the index R:255 G:250 B:250 A:255.
|
|
SpringGreen |
Gets a color with the index R:0 G:255 B:127 A:255.
|
|
SteelBlue |
Gets a color with the index R:70 G:130 B:180 A:255.
|
|
Subtract(Color, Color) |
Subtracts a color from another.
|
|
Subtract(Color%, Color%, Color%) |
Subtracts a color from another.
|
|
Subtraction(Color, Color) |
Subtracts a color from another.
|
|
Tan |
Gets a color with the index R:210 G:180 B:140 A:255.
|
|
Teal |
Gets a color with the index R:0 G:128 B:128 A:255.
|
|
Thistle |
Gets a color with the index R:216 G:191 B:216 A:255.
|
|
Tomato |
Gets a color with the index R:255 G:99 B:71 A:255.
|
|
ToString()()()() |
Get a string representation for the object.
(Overrides ValueType.ToString()()()().) |
|
ToVector3()()()() |
Returns this Color as as 3-component float vector. RGB corresponds
to XYZ.
|
|
ToVector4()()()() |
Returns this Color as 4-component float vector. RGBA corresponds
to XYZW.
|
|
Turquoise |
Gets a color with the index R:64 G:224 B:208 A:255.
|
|
UnaryNegation(Color) |
Negates the color (subtracts index from 1.0f) of each color component.
|
|
Violet |
Gets a color with the index R:238 G:130 B:238 A:255.
|
|
Wheat |
Gets a color with the index R:245 G:222 B:179 A:255.
|
|
White |
Gets a color with the index R:255 G:255 B:255 A:255.
|
|
WhiteSmoke |
Gets a color with the index R:245 G:245 B:245 A:255.
|
|
Yellow |
Gets a color with the index R:255 G:255 B:0 A:255.
|
|
YellowGreen |
Gets a color with the index R:154 G:205 B:50 A:255.
|
Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)