ColorPacked Type
Describes a 32-bit packed color. Copied from - https://github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Color.cs
Constructors
Constructor | Description |
Full Usage:
ColorPacked(packedValue)
Parameters:
uint32
-
The packed value.
|
Constructs an RGBA color from a packed value. The value is a 32-bit unsigned integer, with R in the least significant octet.
|
|
|
|
|
Full Usage:
ColorPacked(color, alpha)
Parameters:
ColorPacked
-
A ColorPacked for RGB values of new ColorPacked instance.
alpha : int
-
The alpha component value from 0 to 255.
|
|
Full Usage:
ColorPacked(color, alpha)
Parameters:
ColorPacked
-
A ColorPacked for RGB values of new ColorPacked instance.
alpha : float32
-
Alpha component value from 0.0f to 1.0f.
|
Constructs an RGBA color from color and alpha value.
|
Full Usage:
ColorPacked(r, g, b)
Parameters:
float32
-
Red component value from 0.0f to 1.0f.
g : float32
-
Green component value from 0.0f to 1.0f.
b : float32
-
Blue component value from 0.0f to 1.0f.
|
Constructs an RGBA color from scalars representing red, green and blue values. Alpha value will be opaque.
|
Full Usage:
ColorPacked(r, g, b, alpha)
Parameters:
float32
-
Red component value from 0.0f to 1.0f.
g : float32
-
Green component value from 0.0f to 1.0f.
b : float32
-
Blue component value from 0.0f to 1.0f.
alpha : float32
-
Alpha component value from 0.0f to 1.0f.
|
Constructs an RGBA color from scalars representing red, green, blue and alpha values.
|
Full Usage:
ColorPacked(r, g, b)
Parameters:
int
-
Red component value from 0 to 255.
g : int
-
Green component value from 0 to 255.
b : int
-
Blue component value from 0 to 255.
|
Constructs an RGBA color from scalars representing red, green and blue values. Alpha value will be opaque.
|
Full Usage:
ColorPacked(r, g, b, alpha)
Parameters:
int
-
Red component value from 0 to 255.
g : int
-
Green component value from 0 to 255.
b : int
-
Blue component value from 0 to 255.
alpha : int
-
Alpha component value from 0 to 255.
|
Constructs an RGBA color from scalars representing red, green, blue and alpha values.
|
Full Usage:
ColorPacked(r, g, b, alpha)
Parameters:
byte
-
g : byte
-
b : byte
-
alpha : byte
-
|
Constructs an RGBA color from scalars representing red, green, blue and alpha values. This overload sets the values directly without clamping, and may therefore be faster than the other overloads.
|
Instance members
Instance member | Description |
Full Usage:
this.A
|
Gets or sets the alpha component. |
Full Usage:
this.B
|
Gets or sets the blue component. |
Full Usage:
this.Deconstruct
Parameters:
byref<byte>
-
Red component value from 0 to 255.
g : byref<byte>
-
Green component value from 0 to 255.
b : byref<byte>
-
Blue component value from 0 to 255.
|
|
Full Usage:
this.Deconstruct
Parameters:
byref<float32>
-
Red component value from 0.0f to 1.0f.
g : byref<float32>
-
Green component value from 0.0f to 1.0f.
b : byref<float32>
-
Blue component value from 0.0f to 1.0f.
|
|
Full Usage:
this.Deconstruct
Parameters:
byref<byte>
-
Red component value from 0 to 255.
g : byref<byte>
-
Green component value from 0 to 255.
b : byref<byte>
-
Blue component value from 0 to 255.
a : byref<byte>
-
Alpha component value from 0 to 255.
|
|
Full Usage:
this.Deconstruct
Parameters:
byref<float32>
-
Red component value from 0.0f to 1.0f.
g : byref<float32>
-
Green component value from 0.0f to 1.0f.
b : byref<float32>
-
Blue component value from 0.0f to 1.0f.
a : byref<float32>
-
Alpha component value from 0.0f to 1.0f.
|
|
Full Usage:
this.Equals
Parameters:
obj
-
The ColorPacked to compare.
Returns: bool
true if the instances are equal; false otherwise.
Modifiers: abstract |
Compares whether current instance is equal to specified object.
|
Full Usage:
this.Equals
Parameters:
ColorPacked
-
The ColorPacked to compare.
Returns: bool
true if the instances are equal; false otherwise.
Modifiers: abstract |
|
Full Usage:
this.G
|
Gets or sets the green component. |
|
|
Full Usage:
this.PackedValue
|
|
Full Usage:
this.R
|
Gets or sets the red component. |
Full Usage:
this.ToString
Returns: string
String representation of this ColorPacked.
Modifiers: abstract |
Returns a String representation of this ColorPacked in the format: {R:[red] G:[green] B:[blue] A:[alpha]}
|
|
|
|
Static members
Static member | Description |
Full Usage:
value * scale
Parameters:
ColorPacked
-
The source color value to multiply.
scale : float32
-
The value to multiply the RGBA component values by.
Returns: ColorPacked
The new color value created as a result of the multiplication.
|
Multiplies the RGBA component values of a color by the specified value.
|
Full Usage:
scale * value
Parameters:
float32
-
The value to multiply the RGBA component values by.
value : ColorPacked
-
The source color value to multiply.
Returns: ColorPacked
The new color value created as a result of the multiplication.
|
Multiplies the RGBA component values of a color by the specified value.
|
Full Usage:
color1 * color2
Parameters:
ColorPacked
-
The first color to be multiplied.
color2 : ColorPacked
-
The second color to be multiplied.
Returns: ColorPacked
The new color value created as a result of the multiplication.
|
Multiplies two colors compenent-wise.
|
Full Usage:
a <> b
Parameters:
ColorPacked
-
ColorPacked instance on the left of the not equal sign.
b : ColorPacked
-
ColorPacked instance on the right of the not equal sign.
Returns: bool
true if the instances are not equal; false otherwise.
|
|
Full Usage:
a = b
Parameters:
ColorPacked
-
ColorPacked instance on the left of the equal sign.
b : ColorPacked
-
ColorPacked instance on the right of the equal sign.
Returns: bool
true if the instances are equal; false otherwise.
|
|
Full Usage:
ColorPacked.AliceBlue
|
AliceBlue color (R:240,G:248,B:255,A:255). |
Full Usage:
ColorPacked.AntiqueWhite
|
AntiqueWhite color (R:250,G:235,B:215,A:255). |
Full Usage:
ColorPacked.Aqua
|
Aqua color (R:0,G:255,B:255,A:255). |
Full Usage:
ColorPacked.Aquamarine
|
Aquamarine color (R:127,G:255,B:212,A:255). |
Full Usage:
ColorPacked.Azure
|
Azure color (R:240,G:255,B:255,A:255). |
Full Usage:
ColorPacked.Beige
|
Beige color (R:245,G:245,B:220,A:255). |
Full Usage:
ColorPacked.Bisque
|
Bisque color (R:255,G:228,B:196,A:255). |
Full Usage:
ColorPacked.Black
|
Black color (R:0,G:0,B:0,A:255). |
Full Usage:
ColorPacked.BlanchedAlmond
|
BlanchedAlmond color (R:255,G:235,B:205,A:255). |
Full Usage:
ColorPacked.Blue
|
Blue color (R:0,G:0,B:255,A:255). |
Full Usage:
ColorPacked.BlueViolet
|
BlueViolet color (R:138,G:43,B:226,A:255). |
Full Usage:
ColorPacked.Brown
|
Brown color (R:165,G:42,B:42,A:255). |
Full Usage:
ColorPacked.BurlyWood
|
BurlyWood color (R:222,G:184,B:135,A:255). |
Full Usage:
ColorPacked.CadetBlue
|
CadetBlue color (R:95,G:158,B:160,A:255). |
Full Usage:
ColorPacked.Chartreuse
|
Chartreuse color (R:127,G:255,B:0,A:255). |
Full Usage:
ColorPacked.Chocolate
|
Chocolate color (R:210,G:105,B:30,A:255). |
Full Usage:
ColorPacked.Coral
|
Coral color (R:255,G:127,B:80,A:255). |
Full Usage:
ColorPacked.CornflowerBlue
|
CornflowerBlue color (R:100,G:149,B:237,A:255). |
Full Usage:
ColorPacked.Cornsilk
|
Cornsilk color (R:255,G:248,B:220,A:255). |
Full Usage:
ColorPacked.Crimson
|
Crimson color (R:220,G:20,B:60,A:255). |
Full Usage:
ColorPacked.Cyan
|
Cyan color (R:0,G:255,B:255,A:255). |
Full Usage:
ColorPacked.DarkBlue
|
DarkBlue color (R:0,G:0,B:139,A:255). |
Full Usage:
ColorPacked.DarkCyan
|
DarkCyan color (R:0,G:139,B:139,A:255). |
Full Usage:
ColorPacked.DarkGoldenrod
|
DarkGoldenrod color (R:184,G:134,B:11,A:255). |
Full Usage:
ColorPacked.DarkGray
|
DarkGray color (R:169,G:169,B:169,A:255). |
Full Usage:
ColorPacked.DarkGreen
|
DarkGreen color (R:0,G:100,B:0,A:255). |
Full Usage:
ColorPacked.DarkKhaki
|
DarkKhaki color (R:189,G:183,B:107,A:255). |
Full Usage:
ColorPacked.DarkMagenta
|
DarkMagenta color (R:139,G:0,B:139,A:255). |
Full Usage:
ColorPacked.DarkOliveGreen
|
DarkOliveGreen color (R:85,G:107,B:47,A:255). |
Full Usage:
ColorPacked.DarkOrange
|
DarkOrange color (R:255,G:140,B:0,A:255). |
Full Usage:
ColorPacked.DarkOrchid
|
DarkOrchid color (R:153,G:50,B:204,A:255). |
Full Usage:
ColorPacked.DarkRed
|
DarkRed color (R:139,G:0,B:0,A:255). |
Full Usage:
ColorPacked.DarkSalmon
|
DarkSalmon color (R:233,G:150,B:122,A:255). |
Full Usage:
ColorPacked.DarkSeaGreen
|
DarkSeaGreen color (R:143,G:188,B:139,A:255). |
Full Usage:
ColorPacked.DarkSlateBlue
|
DarkSlateBlue color (R:72,G:61,B:139,A:255). |
Full Usage:
ColorPacked.DarkSlateGray
|
DarkSlateGray color (R:47,G:79,B:79,A:255). |
Full Usage:
ColorPacked.DarkTurquoise
|
DarkTurquoise color (R:0,G:206,B:209,A:255). |
Full Usage:
ColorPacked.DarkViolet
|
DarkViolet color (R:148,G:0,B:211,A:255). |
Full Usage:
ColorPacked.DeepPink
|
DeepPink color (R:255,G:20,B:147,A:255). |
Full Usage:
ColorPacked.DeepSkyBlue
|
DeepSkyBlue color (R:0,G:191,B:255,A:255). |
Full Usage:
ColorPacked.DimGray
|
DimGray color (R:105,G:105,B:105,A:255). |
Full Usage:
ColorPacked.DodgerBlue
|
DodgerBlue color (R:30,G:144,B:255,A:255). |
Full Usage:
ColorPacked.Firebrick
|
Firebrick color (R:178,G:34,B:34,A:255). |
Full Usage:
ColorPacked.FloralWhite
|
FloralWhite color (R:255,G:250,B:240,A:255). |
Full Usage:
ColorPacked.ForestGreen
|
ForestGreen color (R:34,G:139,B:34,A:255). |
Full Usage:
ColorPacked.FromNonPremultiplied(vector)
Parameters: Returns: ColorPacked
A ColorPacked which contains premultiplied alpha data.
|
|
Full Usage:
ColorPacked.FromNonPremultiplied(r, g, b, a)
Parameters:
int
-
Red component value.
g : int
-
Green component value.
b : int
-
Blue component value.
a : int
-
Alpha component value.
Returns: ColorPacked
A ColorPacked which contains premultiplied alpha data.
|
|
Full Usage:
ColorPacked.Fuchsia
|
Fuchsia color (R:255,G:0,B:255,A:255). |
Full Usage:
ColorPacked.Gainsboro
|
Gainsboro color (R:220,G:220,B:220,A:255). |
Full Usage:
ColorPacked.GhostWhite
|
GhostWhite color (R:248,G:248,B:255,A:255). |
Full Usage:
ColorPacked.Gold
|
Gold color (R:255,G:215,B:0,A:255). |
Full Usage:
ColorPacked.Goldenrod
|
Goldenrod color (R:218,G:165,B:32,A:255). |
Full Usage:
ColorPacked.Gray
|
Gray color (R:128,G:128,B:128,A:255). |
Full Usage:
ColorPacked.Green
|
Green color (R:0,G:128,B:0,A:255). |
Full Usage:
ColorPacked.GreenYellow
|
GreenYellow color (R:173,G:255,B:47,A:255). |
Full Usage:
ColorPacked.Honeydew
|
Honeydew color (R:240,G:255,B:240,A:255). |
Full Usage:
ColorPacked.HotPink
|
HotPink color (R:255,G:105,B:180,A:255). |
Full Usage:
ColorPacked.IndianRed
|
IndianRed color (R:205,G:92,B:92,A:255). |
Full Usage:
ColorPacked.Indigo
|
Indigo color (R:75,G:0,B:130,A:255). |
Full Usage:
ColorPacked.Ivory
|
Ivory color (R:255,G:255,B:240,A:255). |
Full Usage:
ColorPacked.Khaki
|
Khaki color (R:240,G:230,B:140,A:255). |
Full Usage:
ColorPacked.Lavender
|
Lavender color (R:230,G:230,B:250,A:255). |
Full Usage:
ColorPacked.LavenderBlush
|
LavenderBlush color (R:255,G:240,B:245,A:255). |
Full Usage:
ColorPacked.LawnGreen
|
LawnGreen color (R:124,G:252,B:0,A:255). |
Full Usage:
ColorPacked.LemonChiffon
|
LemonChiffon color (R:255,G:250,B:205,A:255). |
Full Usage:
ColorPacked.Lerp(value1, value2, amount)
Parameters:
ColorPacked
-
Source ColorPacked.
value2 : ColorPacked
-
Destination ColorPacked.
amount : float32
-
Interpolation factor.
Returns: ColorPacked
Interpolated ColorPacked.
|
|
Full Usage:
ColorPacked.LightBlue
|
LightBlue color (R:173,G:216,B:230,A:255). |
Full Usage:
ColorPacked.LightCoral
|
LightCoral color (R:240,G:128,B:128,A:255). |
Full Usage:
ColorPacked.LightCyan
|
LightCyan color (R:224,G:255,B:255,A:255). |
Full Usage:
ColorPacked.LightGoldenrodYellow
|
LightGoldenrodYellow color (R:250,G:250,B:210,A:255). |
Full Usage:
ColorPacked.LightGray
|
LightGray color (R:211,G:211,B:211,A:255). |
Full Usage:
ColorPacked.LightGreen
|
LightGreen color (R:144,G:238,B:144,A:255). |
Full Usage:
ColorPacked.LightPink
|
LightPink color (R:255,G:182,B:193,A:255). |
Full Usage:
ColorPacked.LightSalmon
|
LightSalmon color (R:255,G:160,B:122,A:255). |
Full Usage:
ColorPacked.LightSeaGreen
|
LightSeaGreen color (R:32,G:178,B:170,A:255). |
Full Usage:
ColorPacked.LightSkyBlue
|
LightSkyBlue color (R:135,G:206,B:250,A:255). |
Full Usage:
ColorPacked.LightSlateGray
|
LightSlateGray color (R:119,G:136,B:153,A:255). |
Full Usage:
ColorPacked.LightSteelBlue
|
LightSteelBlue color (R:176,G:196,B:222,A:255). |
Full Usage:
ColorPacked.LightYellow
|
LightYellow color (R:255,G:255,B:224,A:255). |
Full Usage:
ColorPacked.Lime
|
Lime color (R:0,G:255,B:0,A:255). |
Full Usage:
ColorPacked.LimeGreen
|
LimeGreen color (R:50,G:205,B:50,A:255). |
Full Usage:
ColorPacked.Linen
|
Linen color (R:250,G:240,B:230,A:255). |
Full Usage:
ColorPacked.Magenta
|
Magenta color (R:255,G:0,B:255,A:255). |
Full Usage:
ColorPacked.Maroon
|
Maroon color (R:128,G:0,B:0,A:255). |
Full Usage:
ColorPacked.MediumAquamarine
|
MediumAquamarine color (R:102,G:205,B:170,A:255). |
Full Usage:
ColorPacked.MediumBlue
|
MediumBlue color (R:0,G:0,B:205,A:255). |
Full Usage:
ColorPacked.MediumOrchid
|
MediumOrchid color (R:186,G:85,B:211,A:255). |
Full Usage:
ColorPacked.MediumPurple
|
MediumPurple color (R:147,G:112,B:219,A:255). |
Full Usage:
ColorPacked.MediumSeaGreen
|
MediumSeaGreen color (R:60,G:179,B:113,A:255). |
Full Usage:
ColorPacked.MediumSlateBlue
|
MediumSlateBlue color (R:123,G:104,B:238,A:255). |
Full Usage:
ColorPacked.MediumSpringGreen
|
MediumSpringGreen color (R:0,G:250,B:154,A:255). |
Full Usage:
ColorPacked.MediumTurquoise
|
MediumTurquoise color (R:72,G:209,B:204,A:255). |
Full Usage:
ColorPacked.MediumVioletRed
|
MediumVioletRed color (R:199,G:21,B:133,A:255). |
Full Usage:
ColorPacked.MidnightBlue
|
MidnightBlue color (R:25,G:25,B:112,A:255). |
Full Usage:
ColorPacked.MintCream
|
MintCream color (R:245,G:255,B:250,A:255). |
Full Usage:
ColorPacked.MistyRose
|
MistyRose color (R:255,G:228,B:225,A:255). |
Full Usage:
ColorPacked.Moccasin
|
Moccasin color (R:255,G:228,B:181,A:255). |
Full Usage:
ColorPacked.MonoGameOrange
|
MonoGame orange theme color (R:231,G:60,B:0,A:255). |
Full Usage:
ColorPacked.Multiply(value, scale)
Parameters:
ColorPacked
-
The source color value to multiply.
scale : float32
-
The value to multiply the RGBA component values by.
Returns: ColorPacked
The new color value created as a result of the multiplication.
|
Multiplies the RGBA component values of a color by the specified value.
|
Full Usage:
ColorPacked.MultiplyAlpha(value, scale)
Parameters:
ColorPacked
-
The source color value to multiply.
scale : float32
-
The value to multiply the Alpha component value by.
Returns: ColorPacked
The new color value created as a result of the multiplication.
|
Multiplies the Alpha component value of a color by the specified value.
|
Full Usage:
ColorPacked.NavajoWhite
|
NavajoWhite color (R:255,G:222,B:173,A:255). |
Full Usage:
ColorPacked.Navy
|
Navy color (R:0,G:0,B:128,A:255). |
Full Usage:
ColorPacked.OldLace
|
OldLace color (R:253,G:245,B:230,A:255). |
Full Usage:
ColorPacked.Olive
|
Olive color (R:128,G:128,B:0,A:255). |
Full Usage:
ColorPacked.OliveDrab
|
OliveDrab color (R:107,G:142,B:35,A:255). |
Full Usage:
ColorPacked.Orange
|
Orange color (R:255,G:165,B:0,A:255). |
Full Usage:
ColorPacked.OrangeRed
|
OrangeRed color (R:255,G:69,B:0,A:255). |
Full Usage:
ColorPacked.Orchid
|
Orchid color (R:218,G:112,B:214,A:255). |
Full Usage:
ColorPacked.PaleGoldenrod
|
PaleGoldenrod color (R:238,G:232,B:170,A:255). |
Full Usage:
ColorPacked.PaleGreen
|
PaleGreen color (R:152,G:251,B:152,A:255). |
Full Usage:
ColorPacked.PaleTurquoise
|
PaleTurquoise color (R:175,G:238,B:238,A:255). |
Full Usage:
ColorPacked.PaleVioletRed
|
PaleVioletRed color (R:219,G:112,B:147,A:255). |
Full Usage:
ColorPacked.PapayaWhip
|
PapayaWhip color (R:255,G:239,B:213,A:255). |
Full Usage:
ColorPacked.PeachPuff
|
PeachPuff color (R:255,G:218,B:185,A:255). |
Full Usage:
ColorPacked.Peru
|
Peru color (R:205,G:133,B:63,A:255). |
Full Usage:
ColorPacked.Pink
|
Pink color (R:255,G:192,B:203,A:255). |
Full Usage:
ColorPacked.Plum
|
Plum color (R:221,G:160,B:221,A:255). |
Full Usage:
ColorPacked.PowderBlue
|
PowderBlue color (R:176,G:224,B:230,A:255). |
Full Usage:
ColorPacked.Purple
|
Purple color (R:128,G:0,B:128,A:255). |
Full Usage:
ColorPacked.Red
|
Red color (R:255,G:0,B:0,A:255). |
Full Usage:
ColorPacked.RosyBrown
|
RosyBrown color (R:188,G:143,B:143,A:255). |
Full Usage:
ColorPacked.RoyalBlue
|
RoyalBlue color (R:65,G:105,B:225,A:255). |
Full Usage:
ColorPacked.SaddleBrown
|
SaddleBrown color (R:139,G:69,B:19,A:255). |
Full Usage:
ColorPacked.Salmon
|
Salmon color (R:250,G:128,B:114,A:255). |
Full Usage:
ColorPacked.SandyBrown
|
SandyBrown color (R:244,G:164,B:96,A:255). |
Full Usage:
ColorPacked.SeaGreen
|
SeaGreen color (R:46,G:139,B:87,A:255). |
Full Usage:
ColorPacked.SeaShell
|
SeaShell color (R:255,G:245,B:238,A:255). |
Full Usage:
ColorPacked.Sienna
|
Sienna color (R:160,G:82,B:45,A:255). |
Full Usage:
ColorPacked.Silver
|
Silver color (R:192,G:192,B:192,A:255). |
Full Usage:
ColorPacked.SkyBlue
|
SkyBlue color (R:135,G:206,B:235,A:255). |
Full Usage:
ColorPacked.SlateBlue
|
SlateBlue color (R:106,G:90,B:205,A:255). |
Full Usage:
ColorPacked.SlateGray
|
SlateGray color (R:112,G:128,B:144,A:255). |
Full Usage:
ColorPacked.Snow
|
Snow color (R:255,G:250,B:250,A:255). |
Full Usage:
ColorPacked.SpringGreen
|
SpringGreen color (R:0,G:255,B:127,A:255). |
Full Usage:
ColorPacked.SteelBlue
|
SteelBlue color (R:70,G:130,B:180,A:255). |
Full Usage:
ColorPacked.Tan
|
Tan color (R:210,G:180,B:140,A:255). |
Full Usage:
ColorPacked.Teal
|
Teal color (R:0,G:128,B:128,A:255). |
Full Usage:
ColorPacked.Thistle
|
Thistle color (R:216,G:191,B:216,A:255). |
Full Usage:
ColorPacked.Tomato
|
Tomato color (R:255,G:99,B:71,A:255). |
Full Usage:
ColorPacked.Transparent
|
Transparent color (R:0,G:0,B:0,A:0). |
Full Usage:
ColorPacked.Turquoise
|
Turquoise color (R:64,G:224,B:208,A:255). |
Full Usage:
ColorPacked.Violet
|
Violet color (R:238,G:130,B:238,A:255). |
Full Usage:
ColorPacked.Wheat
|
Wheat color (R:245,G:222,B:179,A:255). |
Full Usage:
ColorPacked.White
|
White color (R:255,G:255,B:255,A:255). |
Full Usage:
ColorPacked.WhiteSmoke
|
WhiteSmoke color (R:245,G:245,B:245,A:255). |
Full Usage:
ColorPacked.Yellow
|
Yellow color (R:255,G:255,B:0,A:255). |
Full Usage:
ColorPacked.YellowGreen
|
YellowGreen color (R:154,G:205,B:50,A:255). |