Color Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
[Java.Interop.JniValueMarshaler(typeof(Android.Graphics.ColorValueMarshaler))]
public struct Color
[<Java.Interop.JniValueMarshaler(typeof(Android.Graphics.ColorValueMarshaler))>]
type Color = struct
- Inheritance
-
Color
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
| Name | Description |
|---|---|
| Color(Byte, Byte, Byte, Byte) |
Initializes a new instance of the Color struct. |
| Color(Byte, Byte, Byte) |
Initializes a new instance of the Color struct. |
| Color(Int32, Int32, Int32, Int32) |
Initializes a new instance of the Color struct. |
| Color(Int32, Int32, Int32) |
Initializes a new instance of the Color struct. |
| Color(Int32) |
Initializes a new instance of the Color struct. |
Properties
| Name | Description |
|---|---|
| A |
Gets or sets the alpha (opacity) component of the color, where 0 is fully transparent and 255 is fully opaque. |
| AliceBlue |
Gets a Color with the ARGB value #FFF0F8FF (alice blue). |
| AntiqueWhite |
Gets a Color with the ARGB value #FFFAEBD7 (antique white). |
| Aqua |
Gets a Color with the ARGB value #FF00FFFF (aqua). |
| Aquamarine |
Gets a Color with the ARGB value #FF7FFFD4 (aquamarine). |
| Azure |
Gets a Color with the ARGB value #FFF0FFFF (azure). |
| B |
Gets or sets the blue component of the color. |
| Beige |
Gets a Color with the ARGB value #FFF5F5DC (beige). |
| Bisque |
Gets a Color with the ARGB value #FFFFE4C4 (bisque). |
| Black |
Gets a Color with the ARGB value #FF000000 (black). |
| BlanchedAlmond |
Gets a Color with the ARGB value #FFFFEBCD (blanched almond). |
| Blue |
Gets a Color with the ARGB value #FF0000FF (blue). |
| BlueViolet |
Gets a Color with the ARGB value #FF8A2BE2 (blue-violet). |
| Brown |
Gets a Color with the ARGB value #FFA52A2A (brown). |
| BurlyWood |
Gets a Color with the ARGB value #FFDEB887 (burly wood). |
| CadetBlue |
Gets a Color with the ARGB value #FF5F9EA0 (cadet blue). |
| Chartreuse |
Gets a Color with the ARGB value #FF7FFF00 (chartreuse). |
| Chocolate |
Gets a Color with the ARGB value #FFD2691E (chocolate). |
| Coral |
Gets a Color with the ARGB value #FFFF7F50 (coral). |
| CornflowerBlue |
Gets a Color with the ARGB value #FF6495ED (cornflower blue). |
| Cornsilk |
Gets a Color with the ARGB value #FFFFF8DC (cornsilk). |
| Crimson |
Gets a Color with the ARGB value #FFDC143C (crimson). |
| Cyan |
Gets a Color with the ARGB value #FF00FFFF (cyan). |
| DarkBlue |
Gets a Color with the ARGB value #FF00008B (dark blue). |
| DarkCyan |
Gets a Color with the ARGB value #FF008B8B (dark cyan). |
| DarkGoldenrod |
Gets a Color with the ARGB value #FFB8860B (dark goldenrod). |
| DarkGray |
Gets a Color with the ARGB value #FF444444 (dark gray). |
| DarkGreen |
Gets a Color with the ARGB value #FF006400 (dark green). |
| DarkKhaki |
Gets a Color with the ARGB value #FFBDB76B (dark khaki). |
| DarkMagenta |
Gets a Color with the ARGB value #FF8B008B (dark magenta). |
| DarkOliveGreen |
Gets a Color with the ARGB value #FF556B2F (dark olive green). |
| DarkOrange |
Gets a Color with the ARGB value #FFFF8C00 (dark orange). |
| DarkOrchid |
Gets a Color with the ARGB value #FF9932CC (dark orchid). |
| DarkRed |
Gets a Color with the ARGB value #FF8B0000 (dark red). |
| DarkSalmon |
Gets a Color with the ARGB value #FFE9967A (dark salmon). |
| DarkSeaGreen |
Gets a Color with the ARGB value #FF8FBC8B (dark sea green). |
| DarkSlateBlue |
Gets a Color with the ARGB value #FF483D8B (dark slate blue). |
| DarkSlateGray |
Gets a Color with the ARGB value #FF2F4F4F (dark slate gray). |
| DarkTurquoise |
Gets a Color with the ARGB value #FF00CED1 (dark turquoise). |
| DarkViolet |
Gets a Color with the ARGB value #FF9400D3 (dark violet). |
| DeepPink |
Gets a Color with the ARGB value #FFFF1493 (deep pink). |
| DeepSkyBlue |
Gets a Color with the ARGB value #FF00BFFF (deep sky blue). |
| DimGray |
Gets a Color with the ARGB value #FF696969 (dim gray). |
| DodgerBlue |
Gets a Color with the ARGB value #FF1E90FF (dodger blue). |
| Firebrick |
Gets a Color with the ARGB value #FFB22222 (firebrick). |
| FloralWhite |
Gets a Color with the ARGB value #FFFFFAF0 (floral white). |
| ForestGreen |
Gets a Color with the ARGB value #FF228B22 (forest green). |
| Fuchsia |
Gets a Color with the ARGB value #FFFF00FF (fuchsia). |
| G |
Gets or sets the green component of the color. |
| Gainsboro |
Gets a Color with the ARGB value #FFDCDCDC (gainsboro). |
| GhostWhite |
Gets a Color with the ARGB value #FFF8F8FF (ghost white). |
| Gold |
Gets a Color with the ARGB value #FFFFD700 (gold). |
| Goldenrod |
Gets a Color with the ARGB value #FFDAA520 (goldenrod). |
| Gray |
Gets a Color with the ARGB value #FF888888 (gray). |
| Green |
Gets a Color with the ARGB value #FF00FF00 (green). |
| GreenYellow |
Gets a Color with the ARGB value #FFADFF2F (green-yellow). |
| Honeydew |
Gets a Color with the ARGB value #FFF0FFF0 (honeydew). |
| HotPink |
Gets a Color with the ARGB value #FFFF69B4 (hot pink). |
| IndianRed |
Gets a Color with the ARGB value #FFCD5C5C (indian red). |
| Indigo |
Gets a Color with the ARGB value #FF4B0082 (indigo). |
| Ivory |
Gets a Color with the ARGB value #FFFFFFF0 (ivory). |
| Khaki |
Gets a Color with the ARGB value #FFF0E68C (khaki). |
| Lavender |
Gets a Color with the ARGB value #FFE6E6FA (lavender). |
| LavenderBlush |
Gets a Color with the ARGB value #FFFFF0F5 (lavender blush). |
| LawnGreen |
Gets a Color with the ARGB value #FF7CFC00 (lawn green). |
| LemonChiffon |
Gets a Color with the ARGB value #FFFFFACD (lemon chiffon). |
| LightBlue |
Gets a Color with the ARGB value #FFADD8E6 (light blue). |
| LightCoral |
Gets a Color with the ARGB value #FFF08080 (light coral). |
| LightCyan |
Gets a Color with the ARGB value #FFE0FFFF (light cyan). |
| LightGoldenrodYellow |
Gets a Color with the ARGB value #FFFAFAD2 (light goldenrod yellow). |
| LightGray |
Gets a Color with the ARGB value #FFCCCCCC (light gray). |
| LightGreen |
Gets a Color with the ARGB value #FF90EE90 (light green). |
| LightPink |
Gets a Color with the ARGB value #FFFFB6C1 (light pink). |
| LightSalmon |
Gets a Color with the ARGB value #FFFFA07A (light salmon). |
| LightSeaGreen |
Gets a Color with the ARGB value #FF20B2AA (light sea green). |
| LightSkyBlue |
Gets a Color with the ARGB value #FF87CEFA (light sky blue). |
| LightSlateGray |
Gets a Color with the ARGB value #FF778899 (light slate gray). |
| LightSteelBlue |
Gets a Color with the ARGB value #FFB0C4DE (light steel blue). |
| LightYellow |
Gets a Color with the ARGB value #FFFFFFE0 (light yellow). |
| Lime |
Gets a Color with the ARGB value #FF00FF00 (lime). |
| LimeGreen |
Gets a Color with the ARGB value #FF32CD32 (lime green). |
| Linen |
Gets a Color with the ARGB value #FFFAF0E6 (linen). |
| Magenta |
Gets a Color with the ARGB value #FFFF00FF (magenta). |
| Maroon |
Gets a Color with the ARGB value #FF800000 (maroon). |
| MediumAquamarine |
Gets a Color with the ARGB value #FF66CDAA (medium aquamarine). |
| MediumBlue |
Gets a Color with the ARGB value #FF0000CD (medium blue). |
| MediumOrchid |
Gets a Color with the ARGB value #FFBA55D3 (medium orchid). |
| MediumPurple |
Gets a Color with the ARGB value #FF9370DB (medium purple). |
| MediumSeaGreen |
Gets a Color with the ARGB value #FF3CB371 (medium sea green). |
| MediumSlateBlue |
Gets a Color with the ARGB value #FF7B68EE (medium slate blue). |
| MediumSpringGreen |
Gets a Color with the ARGB value #FF00FA9A (medium spring green). |
| MediumTurquoise |
Gets a Color with the ARGB value #FF48D1CC (medium turquoise). |
| MediumVioletRed |
Gets a Color with the ARGB value #FFC71585 (medium violet-red). |
| MidnightBlue |
Gets a Color with the ARGB value #FF191970 (midnight blue). |
| MintCream |
Gets a Color with the ARGB value #FFF5FFFA (mint cream). |
| MistyRose |
Gets a Color with the ARGB value #FFFFE4E1 (misty rose). |
| Moccasin |
Gets a Color with the ARGB value #FFFFE4B5 (moccasin). |
| NavajoWhite |
Gets a Color with the ARGB value #FFFFDEAD (navajo white). |
| Navy |
Gets a Color with the ARGB value #FF000080 (navy). |
| OldLace |
Gets a Color with the ARGB value #FFFDF5E6 (old lace). |
| Olive |
Gets a Color with the ARGB value #FF808000 (olive). |
| OliveDrab |
Gets a Color with the ARGB value #FF6B8E23 (olive drab). |
| Orange |
Gets a Color with the ARGB value #FFFFA500 (orange). |
| OrangeRed |
Gets a Color with the ARGB value #FFFF4500 (orange-red). |
| Orchid |
Gets a Color with the ARGB value #FFDA70D6 (orchid). |
| PaleGoldenrod |
Gets a Color with the ARGB value #FFEEE8AA (pale goldenrod). |
| PaleGreen |
Gets a Color with the ARGB value #FF98FB98 (pale green). |
| PaleTurquoise |
Gets a Color with the ARGB value #FFAFEEEE (pale turquoise). |
| PaleVioletRed |
Gets a Color with the ARGB value #FFDB7093 (pale violet-red). |
| PapayaWhip |
Gets a Color with the ARGB value #FFFFEFD5 (papaya whip). |
| PeachPuff |
Gets a Color with the ARGB value #FFFFDAB9 (peach puff). |
| Peru |
Gets a Color with the ARGB value #FFCD853F (peru). |
| Pink |
Gets a Color with the ARGB value #FFFFC0CB (pink). |
| Plum |
Gets a Color with the ARGB value #FFDDA0DD (plum). |
| PowderBlue |
Gets a Color with the ARGB value #FFB0E0E6 (powder blue). |
| Purple |
Gets a Color with the ARGB value #FF800080 (purple). |
| R |
Gets or sets the red component of the color. |
| Red |
Gets a Color with the ARGB value #FFFF0000 (red). |
| RosyBrown |
Gets a Color with the ARGB value #FFBC8F8F (rosy brown). |
| RoyalBlue |
Gets a Color with the ARGB value #FF4169E1 (royal blue). |
| SaddleBrown |
Gets a Color with the ARGB value #FF8B4513 (saddle brown). |
| Salmon |
Gets a Color with the ARGB value #FFFA8072 (salmon). |
| SandyBrown |
Gets a Color with the ARGB value #FFF4A460 (sandy brown). |
| SeaGreen |
Gets a Color with the ARGB value #FF2E8B57 (sea green). |
| SeaShell |
Gets a Color with the ARGB value #FFFFF5EE (sea shell). |
| Sienna |
Gets a Color with the ARGB value #FFA0522D (sienna). |
| Silver |
Gets a Color with the ARGB value #FFC0C0C0 (silver). |
| SkyBlue |
Gets a Color with the ARGB value #FF87CEEB (sky blue). |
| SlateBlue |
Gets a Color with the ARGB value #FF6A5ACD (slate blue). |
| SlateGray |
Gets a Color with the ARGB value #FF708090 (slate gray). |
| Snow |
Gets a Color with the ARGB value #FFFFFAFA (snow). |
| SpringGreen |
Gets a Color with the ARGB value #FF00FF7F (spring green). |
| SteelBlue |
Gets a Color with the ARGB value #FF4682B4 (steel blue). |
| Tan |
Gets a Color with the ARGB value #FFD2B48C (tan). |
| Teal |
Gets a Color with the ARGB value #FF008080 (teal). |
| Thistle |
Gets a Color with the ARGB value #FFD8BFD8 (thistle). |
| Tomato |
Gets a Color with the ARGB value #FFFF6347 (tomato). |
| Transparent |
Gets a fully transparent Color (ARGB #00000000). |
| Turquoise |
Gets a Color with the ARGB value #FF40E0D0 (turquoise). |
| Violet |
Gets a Color with the ARGB value #FFEE82EE (violet). |
| Wheat |
Gets a Color with the ARGB value #FFF5DEB3 (wheat). |
| White |
Gets a Color with the ARGB value #FFFFFFFF (white). |
| WhiteSmoke |
Gets a Color with the ARGB value #FFF5F5F5 (white smoke). |
| Yellow |
Gets a Color with the ARGB value #FFFFFF00 (yellow). |
| YellowGreen |
Gets a Color with the ARGB value #FF9ACD32 (yellow-green). |
Methods
| Name | Description |
|---|---|
| Argb(Int32, Int32, Int32, Int32) | |
| ColorToHSV(Color, Single[]) | |
| Equals(Object) |
Determines if this instance of a Color struct and another are the same. |
| GetAlphaComponent(Int32) |
Extracts the alpha (opacity) component from a packed ARGB color integer, where 0 is fully transparent and 255 is fully opaque. |
| GetBlueComponent(Int32) |
Extracts the blue component from a packed ARGB color integer. |
| GetBrightness() | |
| GetGreenComponent(Int32) |
Extracts the green component from a packed ARGB color integer. |
| GetHashCode() | |
| GetHue() | |
| GetRedComponent(Int32) |
Extracts the red component from a packed ARGB color integer. |
| GetSaturation() | |
| HSVToColor(Int32, Single[]) | |
| HSVToColor(Single[]) | |
| ParseColor(String) | |
| Rgb(Int32, Int32, Int32) | |
| RGBToHSV(Int32, Int32, Int32, Single[]) | |
| ToArgb() |
Return an integer representation of the Color. |
| ToString() |
Creates a string representation of the Color. |
Operators
| Name | Description |
|---|---|
| Equality(Color, Color) |
Determine if two Color structs have the same value. |
| Implicit(Color to Int32) |
Implicitly casts a Color to an integer. |
| Inequality(Color, Color) |
Determine if two Color structs do not have the same value. |