Xamarin.Forms Guides | Samples

Xamarin.Forms.Color Structure

Class that represents a color and exposes it as RGBA and HSL values.

See Also: Color

Syntax

[System.Diagnostics.DebuggerDisplay("R={R}, G={G}, B={B}, A={A}, Hue={Hue}, Saturation={Saturation}, Luminosity={Luminosity}")]
[Xamarin.Forms.TypeConverter(typeof(Xamarin.Forms.ColorTypeConverter))]
public struct Color

Remarks

This type is immutable. Colors can be expressed in the RGB or HSL modes. While the Forms.Color constructor takes R, G, B, and A values, the Color class also calculates and makes available HSL data for the color.

In XAML, application developers can specify any property that is of type Color, for example, Label.TextColor either as a XAML attribute or as a nested tag. The following code example shows how to specify the text color for a label by using an attribute:

XAML Example

<Label VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" TextColor="Green">
    <Label.Text>Hello, World!</Label.Text>
</Label>

The example below shows how to specify the text color for a label by using a nested tag:

XAML Example

<Label VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
    <Label.Text>Hello, World!</Label.Text>
    <Label.TextColor>Color.Blue</Label.TextColor>
</Label>

Application developers can specify colors in XAML either as a hexadecimal number or as a valid color name.

When specifying a color with a hexadecimal number, app developers can use 3, 4, or 6 digits. If the developer specifies 3 digits, they are interpreted as RGB doublet data for a fully opaque color. For example, "#123" specifies the color that is represented by "#FF112233". If the developer provides a 4-digit hexadecimal number, then the data are interpreted as above, except that the first digit specifies the alpha channel. For example, "#1234" specifies the color that is represented by "#11223344". Finally, if the developer provides a 6 digit hexadecimal number, the data are interpreted as a fully opaque color with those RGB values. For example, "#112233" specifies the color that is represented by "#FF112233".

When specifying a color with a string, app developers can use color name in isolation, or prefix it with "Color.". For example, both Purple and Color.Purple are valid ways to specify the color purple. The following table describes the valid color names that can be used to specify colors in XAML.

ColorShort NameRGB Value
Color.TransparentTransparent255, 255, 255 (With the alpha channel set to 0.)
Color.AquaAqua0, 255, 255
Color.BlackBlack0, 0, 0
Color.BlueBlue0, 0, 255
Color.FuchsiaFuchsia255, 0, 255
Color.GrayGray128, 128, 128
Color.GreenGreen0, 128, 0
Color.LimeLime0, 255, 0
Color.MaroonMaroon128, 0, 0
Color.NavyNavy0, 0, 128
Color.OliveOlive128, 128, 0
Color.OrangeOrange255, 165, 0
Color.PurplePurple128, 0, 128
Color.PinkPink255, 192, 203
Color.RedRed255, 0, 0
Color.SilverSilver192, 192, 192
Color.TealTeal0, 128, 128
Color.WhiteWhite255, 255, 255
Color.YellowYellow255, 255, 0
Color.AliceBlueAliceBlue240, 248, 255
Color.AntiqueWhiteAntiqueWhite250, 235, 215
Color.AquamarineAquamarine127, 255, 212
Color.AzureAzure240, 255, 255
Color.BeigeBeige245, 245, 220
Color.BisqueBisque255, 228, 196
Color.BlanchedAlmondBlanchedAlmond255, 235, 205
Color.BlueVioletBlueViolet138, 43, 226
Color.BrownBrown165, 42, 42
Color.BurlyWoodBurlyWood222, 184, 135
Color.CadetBlueCadetBlue95, 158, 160
Color.ChartreuseChartreuse127, 255, 0
Color.ChocolateChocolate210, 105, 30
Color.CoralCoral255, 127, 80
Color.CornflowerBlueCornflowerBlue100, 149, 237
Color.CornsilkCornsilk255, 248, 220
Color.CrimsonCrimson220, 20, 60
Color.CyanCyan0, 255, 255
Color.DarkBlueDarkBlue0, 0, 139
Color.DarkCyanDarkCyan0, 139, 139
Color.DarkGoldenrodDarkGoldenrod184, 134, 11
Color.DarkGrayDarkGray169, 169, 169
Color.DarkGreenDarkGreen0, 100, 0
Color.DarkKhakiDarkKhaki189, 183, 107
Color.DarkMagentaDarkMagenta139, 0, 139
Color.DarkOliveGreenDarkOliveGreen85, 107, 47
Color.DarkOrangeDarkOrange255, 140, 0
Color.DarkOrchidDarkOrchid153, 50, 204
Color.DarkRedDarkRed139, 0, 0
Color.DarkSalmonDarkSalmon233, 150, 122
Color.DarkSeaGreenDarkSeaGreen143, 188, 143
Color.DarkSlateBlueDarkSlateBlue72, 61, 139
Color.DarkSlateGrayDarkSlateGray47, 79, 79
Color.DarkTurquoiseDarkTurquoise0, 206, 209
Color.DarkVioletDarkViolet148, 0, 211
Color.DeepPinkDeepPink255, 20, 147
Color.DeepSkyBlueDeepSkyBlue0, 191, 255
Color.DimGrayDimGray105, 105, 105
Color.DodgerBlueDodgerBlue30, 144, 255
Color.FirebrickFirebrick178, 34, 34
Color.FloralWhiteFloralWhite255, 250, 240
Color.ForestGreenForestGreen34, 139, 34
Color.GainsboroGainsboro220, 220, 220
Color.GhostWhiteGhostWhite248, 248, 255
Color.GoldGold255, 215, 0
Color.GoldenrodGoldenrod218, 165, 32
Color.GreenYellowGreenYellow173, 255, 47
Color.HoneydewHoneydew240, 255, 240
Color.HotPinkHotPink255, 105, 180
Color.IndianRedIndianRed205, 92, 92
Color.IndigoIndigo75, 0, 130
Color.IvoryIvory255, 255, 240
Color.KhakiKhaki240, 230, 140
Color.LavenderLavender230, 230, 250
Color.LavenderBlushLavenderBlush255, 240, 245
Color.LawnGreenLawnGreen124, 252, 0
Color.LemonChiffonLemonChiffon255, 250, 205
Color.LightBlueLightBlue173, 216, 230
Color.LightCoralLightCoral240, 128, 128
Color.LightCyanLightCyan224, 255, 255
Color.LightGoldenrodYellowLightGoldenrodYellow250, 250, 210
Color.LightGrayLightGray211, 211, 211
Color.LightGreenLightGreen144, 238, 144
Color.LightPinkLightPink255, 182, 193
Color.LightSalmonLightSalmon255, 160, 122
Color.LightSeaGreenLightSeaGreen32, 178, 170
Color.LightSkyBlueLightSkyBlue135, 206, 250
Color.LightSlateGrayLightSlateGray119, 136, 153
Color.LightSteelBlueLightSteelBlue176, 196, 222
Color.LightYellowLightYellow255, 255, 224
Color.LimeGreenLimeGreen50, 205, 50
Color.LinenLinen250, 240, 230
Color.MagentaMagenta255, 0, 255
Color.MediumAquamarineMediumAquamarine102, 205, 170
Color.MediumBlueMediumBlue0, 0, 205
Color.MediumOrchidMediumOrchid186, 85, 211
Color.MediumPurpleMediumPurple147, 112, 219
Color.MediumSeaGreenMediumSeaGreen60, 179, 113
Color.MediumSlateBlueMediumSlateBlue123, 104, 238
Color.MediumSpringGreenMediumSpringGreen0, 250, 154
Color.MediumTurquoiseMediumTurquoise72, 209, 204
Color.MediumVioletRedMediumVioletRed199, 21, 133
Color.MidnightBlueMidnightBlue25, 25, 112
Color.MintCreamMintCream245, 255, 250
Color.MistyRoseMistyRose255, 228, 225
Color.MoccasinMoccasin255, 228, 181
Color.NavajoWhiteNavajoWhite255, 222, 173
Color.OldLaceOldLace253, 245, 230
Color.OliveDrabOliveDrab107, 142, 35
Color.OrangeRedOrangeRed255, 69, 0
Color.OrchidOrchid218, 112, 214
Color.PaleGoldenrodPaleGoldenrod238, 232, 170
Color.PaleGreenPaleGreen152, 251, 152
Color.PaleTurquoisePaleTurquoise175, 238, 238
Color.PaleVioletRedPaleVioletRed219, 112, 147
Color.PapayaWhipPapayaWhip255, 239, 213
Color.PeachPuffPeachPuff255, 218, 185
Color.PeruPeru205, 133, 63
Color.PlumPlum221, 160, 221
Color.PowderBluePowderBlue176, 224, 230
Color.RosyBrownRosyBrown188, 143, 143
Color.RoyalBlueRoyalBlue65, 105, 225
Color.SaddleBrownSaddleBrown139, 69, 19
Color.SalmonSalmon250, 128, 114
Color.SandyBrownSandyBrown244, 164, 96
Color.SeaGreenSeaGreen46, 139, 87
Color.SeaShellSeaShell255, 245, 238
Color.SiennaSienna160, 82, 45
Color.SkyBlueSkyBlue135, 206, 235
Color.SlateBlueSlateBlue106, 90, 205
Color.SlateGraySlateGray112, 128, 144
Color.SnowSnow255, 250, 250
Color.SpringGreenSpringGreen0, 255, 127
Color.SteelBlueSteelBlue70, 130, 180
Color.TanTan210, 180, 140
Color.ThistleThistle216, 191, 216
Color.TomatoTomato255, 99, 71
Color.TurquoiseTurquoise64, 224, 208
Color.VioletViolet238, 130, 238
Color.WheatWheat245, 222, 179
Color.WhiteSmokeWhiteSmoke245, 245, 245
Color.YellowGreenYellowGreen154, 205, 50

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.Color are listed below.

See Also: ValueType

Public Constructors

Initialize a new gray color.
Initializes a new RGB color.
Initializes a new RGB color with an alpha channel.

Public Fields

static readonly
AliceBlueColor. AliceBlue, the color that is represented by the RGB value #FFF0F8FF.
static readonly
AntiqueWhiteColor. AntiqueWhite, the color that is represented by the RGB value #FFFAEBD7.
static readonly
AquaColor. Aqua, the color that is represented by the RGB value #00ffff.
static readonly
AquamarineColor. Aquamarine, the color that is represented by the RGB value #FF7FFFD4.
static readonly
AzureColor. Azure, the color that is represented by the RGB value #FFF0FFFF.
static readonly
BeigeColor. Beige, the color that is represented by the RGB value #FFF5F5DC.
static readonly
BisqueColor. Bisque, the color that is represented by the RGB value #FFFFE4C4.
static readonly
BlackColor. Black, the color that is represented by the RGB value #000000.
static readonly
BlanchedAlmondColor. BlanchedAlmond, the color that is represented by the RGB value #FFFFEBCD.
static readonly
BlueColor. Blue, the color that is represented by the RGB value #0000ff.
static readonly
BlueVioletColor. BlueViolet, the color that is represented by the RGB value #FF8A2BE2.
static readonly
BrownColor. Brown, the color that is represented by the RGB value #FFA52A2A.
static readonly
BurlyWoodColor. BurlyWood, the color that is represented by the RGB value #FFDEB887.
static readonly
CadetBlueColor. CadetBlue, the color that is represented by the RGB value #FF5F9EA0.
static readonly
ChartreuseColor. Chartreuse, the color that is represented by the RGB value #FF7FFF00.
static readonly
ChocolateColor. Chocolate, the color that is represented by the RGB value #FFD2691E.
static readonly
CoralColor. Coral, the color that is represented by the RGB value #FFFF7F50.
static readonly
CornflowerBlueColor. CornflowerBlue, the color that is represented by the RGB value #FF6495ED.
static readonly
CornsilkColor. Cornsilk, the color that is represented by the RGB value #FFFFF8DC.
static readonly
CrimsonColor. Crimson, the color that is represented by the RGB value #FFDC143C.
static readonly
CyanColor. Cyan, the color that is represented by the RGB value #FF00FFFF.
static readonly
DarkBlueColor. DarkBlue, the color that is represented by the RGB value #FF00008B.
static readonly
DarkCyanColor. DarkCyan, the color that is represented by the RGB value #FF008B8B.
static readonly
DarkGoldenrodColor. DarkGoldenrod, the color that is represented by the RGB value #FFB8860B.
static readonly
DarkGrayColor. DarkGray, the color that is represented by the RGB value #FFA9A9A9.
static readonly
DarkGreenColor. DarkGreen, the color that is represented by the RGB value #FF006400.
static readonly
DarkKhakiColor. DarkKhaki, the color that is represented by the RGB value #FFBDB76B.
static readonly
DarkMagentaColor. DarkMagenta, the color that is represented by the RGB value #FF8B008B.
static readonly
DarkOliveGreenColor. DarkOliveGreen, the color that is represented by the RGB value #FF556B2F.
static readonly
DarkOrangeColor. DarkOrange, the color that is represented by the RGB value #FFFF8C00.
static readonly
DarkOrchidColor. DarkOrchid, the color that is represented by the RGB value #FF9932CC.
static readonly
DarkRedColor. DarkRed, the color that is represented by the RGB value #FF8B0000.
static readonly
DarkSalmonColor. DarkSalmon, the color that is represented by the RGB value #FFE9967A.
static readonly
DarkSeaGreenColor. DarkSeaGreen, the color that is represented by the RGB value #FF8FBC8F.
static readonly
DarkSlateBlueColor. DarkSlateBlue, the color that is represented by the RGB value #FF483D8B.
static readonly
DarkSlateGrayColor. DarkSlateGray, the color that is represented by the RGB value #FF2F4F4F.
static readonly
DarkTurquoiseColor. DarkTurquoise, the color that is represented by the RGB value #FF00CED1.
static readonly
DarkVioletColor. DarkViolet, the color that is represented by the RGB value #FF9400D3.
static readonly
DeepPinkColor. DeepPink, the color that is represented by the RGB value #FFFF1493.
static readonly
DeepSkyBlueColor. DeepSkyBlue, the color that is represented by the RGB value #FF00BFFF.
static readonly
DimGrayColor. DimGray, the color that is represented by the RGB value #FF696969.
static readonly
DodgerBlueColor. DodgerBlue, the color that is represented by the RGB value #FF1E90FF.
static readonly
FirebrickColor. Firebrick, the color that is represented by the RGB value #FFB22222.
static readonly
FloralWhiteColor. FloralWhite, the color that is represented by the RGB value #FFFFFAF0.
static readonly
ForestGreenColor. ForestGreen, the color that is represented by the RGB value #FF228B22.
static readonly
FuchsiaColor. Fucshia, the color that is represented by the RGB value #ff00ff.
static readonly
FuschiaColor. Fucshia, the color that is represented by the RGB value #ff00ff. Deprecated. See Remarks.
static readonly
GainsboroColor. Gainsboro, the color that is represented by the RGB value #FFDCDCDC.
static readonly
GhostWhiteColor. GhostWhite, the color that is represented by the RGB value #FFF8F8FF.
static readonly
GoldColor. Gold, the color that is represented by the RGB value #FFFFD700.
static readonly
GoldenrodColor. Goldenrod, the color that is represented by the RGB value #FFDAA520.
static readonly
GrayColor. Gray, the color that is represented by the RGB value #808080.
static readonly
GreenColor. Green, the color that is represented by the RGB value #008000.
static readonly
GreenYellowColor. GreenYellow, the color that is represented by the RGB value #FFADFF2F.
static readonly
HoneydewColor. Honeydew, the color that is represented by the RGB value #FFF0FFF0.
static readonly
HotPinkColor. HotPink, the color that is represented by the RGB value #FFFF69B4.
static readonly
IndianRedColor. IndianRed, the color that is represented by the RGB value #FFCD5C5C.
static readonly
IndigoColor. Indigo, the color that is represented by the RGB value #FF4B0082.
static readonly
IvoryColor. Ivory, the color that is represented by the RGB value #FFFFFFF0.
static readonly
KhakiColor. Khaki, the color that is represented by the RGB value #FFF0E68C.
static readonly
LavenderColor. Lavender, the color that is represented by the RGB value #FFE6E6FA.
static readonly
LavenderBlushColor. LavenderBlush, the color that is represented by the RGB value #FFFFF0F5.
static readonly
LawnGreenColor. LawnGreen, the color that is represented by the RGB value #FF7CFC00.
static readonly
LemonChiffonColor. LemonChiffon, the color that is represented by the RGB value #FFFFFACD.
static readonly
LightBlueColor. LightBlue, the color that is represented by the RGB value #FFADD8E6.
static readonly
LightCoralColor. LightCoral, the color that is represented by the RGB value #FFF08080.
static readonly
LightCyanColor. LightCyan, the color that is represented by the RGB value #FFE0FFFF.
static readonly
LightGoldenrodYellowColor. LightGoldenrodYellow, the color that is represented by the RGB value #FFFAFAD2.
static readonly
LightGrayColor. LightGray, the color that is represented by the RGB value #FFD3D3D3.
static readonly
LightGreenColor. LightGreen, the color that is represented by the RGB value #FF90EE90.
static readonly
LightPinkColor. LightPink, the color that is represented by the RGB value #FFFFB6C1.
static readonly
LightSalmonColor. LightSalmon, the color that is represented by the RGB value #FFFFA07A.
static readonly
LightSeaGreenColor. LightSeaGreen, the color that is represented by the RGB value #FF20B2AA.
static readonly
LightSkyBlueColor. LightSkyBlue, the color that is represented by the RGB value #FF87CEFA.
static readonly
LightSlateGrayColor. LightSlateGray, the color that is represented by the RGB value #FF778899.
static readonly
LightSteelBlueColor. LightSteelBlue, the color that is represented by the RGB value #FFB0C4DE.
static readonly
LightYellowColor. LightYellow, the color that is represented by the RGB value #FFFFFFE0.
static readonly
LimeColor. Lime, the color that is represented by the RGB value #00ff00.
static readonly
LimeGreenColor. LimeGreen, the color that is represented by the RGB value #FF32CD32.
static readonly
LinenColor. Linen, the color that is represented by the RGB value #FFFAF0E6.
static readonly
MagentaColor. Magenta, the color that is represented by the RGB value #FFFF00FF.
static readonly
MaroonColor. Maroon, the color that is represented by the RGB value #800000.
static readonly
MediumAquamarineColor. MediumAquamarine, the color that is represented by the RGB value #FF66CDAA.
static readonly
MediumBlueColor. MediumBlue, the color that is represented by the RGB value #FF0000CD.
static readonly
MediumOrchidColor. MediumOrchid, the color that is represented by the RGB value #FFBA55D3.
static readonly
MediumPurpleColor. MediumPurple, the color that is represented by the RGB value #FF9370DB.
static readonly
MediumSeaGreenColor. MediumSeaGreen, the color that is represented by the RGB value #FF3CB371.
static readonly
MediumSlateBlueColor. MediumSlateBlue, the color that is represented by the RGB value #FF7B68EE.
static readonly
MediumSpringGreenColor. MediumSpringGreen, the color that is represented by the RGB value #FF00FA9A.
static readonly
MediumTurquoiseColor. MediumTurquoise, the color that is represented by the RGB value #FF48D1CC.
static readonly
MediumVioletRedColor. MediumVioletRed, the color that is represented by the RGB value #FFC71585.
static readonly
MidnightBlueColor. MidnightBlue, the color that is represented by the RGB value #FF191970.
static readonly
MintCreamColor. MintCream, the color that is represented by the RGB value #FFF5FFFA.
static readonly
MistyRoseColor. MistyRose, the color that is represented by the RGB value #FFFFE4E1.
static readonly
MoccasinColor. Moccasin, the color that is represented by the RGB value #FFFFE4B5.
static readonly
NavajoWhiteColor. NavajoWhite, the color that is represented by the RGB value #FFFFDEAD.
static readonly
NavyColor. Navy, the color that is represented by the RGB value #000080.
static readonly
OldLaceColor. OldLace, the color that is represented by the RGB value #FFFDF5E6.
static readonly
OliveColor. Olive, the color that is represented by the RGB value #808000.
static readonly
OliveDrabColor. OliveDrab, the color that is represented by the RGB value #FF6B8E23.
static readonly
OrangeColor. Orange, the color that is represented by the RGB value #ffa500.
static readonly
OrangeRedColor. OrangeRed, the color that is represented by the RGB value #FFFF4500.
static readonly
OrchidColor. Orchid, the color that is represented by the RGB value #FFDA70D6.
static readonly
PaleGoldenrodColor. PaleGoldenrod, the color that is represented by the RGB value #FFEEE8AA.
static readonly
PaleGreenColor. PaleGreen, the color that is represented by the RGB value #FF98FB98.
static readonly
PaleTurquoiseColor. PaleTurquoise, the color that is represented by the RGB value #FFAFEEEE.
static readonly
PaleVioletRedColor. PaleVioletRed, the color that is represented by the RGB value #FFDB7093.
static readonly
PapayaWhipColor. PapayaWhip, the color that is represented by the RGB value #FFFFEFD5.
static readonly
PeachPuffColor. PeachPuff, the color that is represented by the RGB value #FFFFDAB9.
static readonly
PeruColor. Peru, the color that is represented by the RGB value #FFCD853F.
static readonly
PinkColor. Pink, the color that is represented by the RGB value #ff66ff.
static readonly
PlumColor. Plum, the color that is represented by the RGB value #FFDDA0DD.
static readonly
PowderBlueColor. PowderBlue, the color that is represented by the RGB value #FFB0E0E6.
static readonly
PurpleColor. Purple, the color that is represented by the RGB value #800080.
static readonly
RedColor. Red, the color that is represented by the RGB value #ff0000.
static readonly
RosyBrownColor. RosyBrown, the color that is represented by the RGB value #FFBC8F8F.
static readonly
RoyalBlueColor. RoyalBlue, the color that is represented by the RGB value #FF4169E1.
static readonly
SaddleBrownColor. SaddleBrown, the color that is represented by the RGB value #FF8B4513.
static readonly
SalmonColor. Salmon, the color that is represented by the RGB value #FFFA8072.
static readonly
SandyBrownColor. SandyBrown, the color that is represented by the RGB value #FFF4A460.
static readonly
SeaGreenColor. SeaGreen, the color that is represented by the RGB value #FF2E8B57.
static readonly
SeaShellColor. SeaShell, the color that is represented by the RGB value #FFFFF5EE.
static readonly
SiennaColor. Sienna, the color that is represented by the RGB value #FFA0522D.
static readonly
SilverColor. Silver, the color that is represented by the RGB value #c0c0c0.
static readonly
SkyBlueColor. SkyBlue, the color that is represented by the RGB value #FF87CEEB.
static readonly
SlateBlueColor. SlateBlue, the color that is represented by the RGB value #FF6A5ACD.
static readonly
SlateGrayColor. SlateGray, the color that is represented by the RGB value #FF708090.
static readonly
SnowColor. Snow, the color that is represented by the RGB value #FFFFFAFA.
static readonly
SpringGreenColor. SpringGreen, the color that is represented by the RGB value #FF00FF7F.
static readonly
SteelBlueColor. SteelBlue, the color that is represented by the RGB value #FF4682B4.
static readonly
TanColor. Tan, the color that is represented by the RGB value #FFD2B48C.
static readonly
TealColor. Teal, the color that is represented by the RGB value #008080.
static readonly
ThistleColor. Thistle, the color that is represented by the RGB value #FFD8BFD8.
static readonly
TomatoColor. Tomato, the color that is represented by the RGB value #FFFF6347.
static readonly
TransparentColor. The transparent color, represented by the RGB value #ffffff00.
static readonly
TurquoiseColor. Turquoise, the color that is represented by the RGB value #FF40E0D0.
static readonly
VioletColor. Violet, the color that is represented by the RGB value #FFEE82EE.
static readonly
WheatColor. Wheat, the color that is represented by the RGB value #FFF5DEB3.
static readonly
WhiteColor. White, the color that is represented by the RGB value #ffffff.
static readonly
WhiteSmokeColor. WhiteSmoke, the color that is represented by the RGB value #FFF5F5F5.
static readonly
YellowColor. Yellow, the color that is represented by the RGB value #ffff00..
static readonly
YellowGreenColor. YellowGreen, the color that is represented by the RGB value #FF9ACD32.

Public Properties

[read-only]
ADouble. Gets the alpha component of the color.
[read-only]
static
AccentColor. Gets the accent or tint color from the application.
[read-only]
BDouble. Gets the blue component of the color.
[read-only]
static
DefaultColor. Returns the default color.
[read-only]
GDouble. Gets the Green component of the color.
[read-only]
HueDouble. Gets the Hue of the color.
[read-only]
LuminosityDouble. Gets the Luminosity fo the color.
[read-only]
RDouble. Gets the Red component of the color.
[read-only]
SaturationDouble. Gets the Saturation of the color

Public Methods

AddLuminosity(Double) : Color
Returns a new Color with a modified luminosity channel.
override
Equals(Object) : Boolean
Determine if the provided Object is equivalent to the current Color.
static
FromHex(String) : Color
Returns a new RGB Color instance with the requested Red, Green, and Blue channels. The Alpha channel is set if hex contains one.
static
FromHsla(Double, Double, Double, Double) : Color
Returns a new HSL Color with an alpha channel
static
FromRgb(Double, Double, Double) : Color
Returns a new rgb color instance.
static
FromRgb(Int32, Int32, Int32) : Color
Returns a new rgb color instance.
static
FromRgba(Double, Double, Double, Double) : Color
Returns a new RGBA color instance.
static
FromRgba(Int32, Int32, Int32, Int32) : Color
Returns a new RGBA color instance.
static
FromUint(UInt32) : Color
Returns a new Color with the requested RGBA value.
override
GetHashCode() : Int32
Returns the Hashcode for this Object.
MultiplyAlpha(Double) : Color
Returns a new color with the alpha channel multiplied by alpha, clamped to the inclusive range [0-1].
override
ToString() : String
Returns a string representation of the Color.
WithHue(Double) : Color
Returns a color with modified Hue, but keeping the same Saturation and Luminosity.
WithLuminosity(Double) : Color
Returns a color with modified Luminosity.
WithSaturation(Double) : Color
Returns a new color with modified Saturation.

Public Operators

static
Equality(Color, Color)Returns true if color1 represents the same color as color1.
static
Inequality(Color, Color)Returns true if color1 does not represent the same color as color1.