Class Color
A universally compatible Color for .NET 7, .NET 6, .NET 5, and .NET Core. As well as compatibility with Windows, NanoServer, IIS, macOS, Mobile, Xamarin, iOS, Android, Google Compute, Azure, AWS, and Linux.
Works nicely with popular Image Color such as System.Drawing.Color,
Implicit casting means that using this class to input and output Color from public APIs gives full compatibility to all Color-types fully supported by Microsoft.
Inheritance
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class Color : Object
Constructors
Color(Int32, Int32, Int32)
Construct a new Color.
Further Documentation:
Code Example
Declaration
public Color(int red, int green, int blue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | red | The red component. Valid values are 0 through 255. |
| System.Int32 | green | The green component. Valid values are 0 through 255. |
| System.Int32 | blue | The blue component. Valid values are 0 through 255. |
Color(Int32, Int32, Int32, Int32)
Construct a new Color.
Further Documentation:
Code Example
Declaration
public Color(int alpha, int red, int green, int blue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | alpha | The alpha component. Valid values are 0 through 255. |
| System.Int32 | red | The red component. Valid values are 0 through 255. |
| System.Int32 | green | The green component. Valid values are 0 through 255. |
| System.Int32 | blue | The blue component. Valid values are 0 through 255. |
Color(String)
Construct a new Color.
Further Documentation:
Code Example
Declaration
public Color(string color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | color | The hexadecimal representation of the combined color components arranged in rgb, argb, rrggbb, or aarrggbb format to match web syntax. |
Fields
Accent1
Represents the accent1 color.
Declaration
public static readonly Color Accent1
Field Value
| Type | Description |
|---|---|
| Color |
Accent2
Represents the accent2 color.
Declaration
public static readonly Color Accent2
Field Value
| Type | Description |
|---|---|
| Color |
Accent3
Represents the accent3 color.
Declaration
public static readonly Color Accent3
Field Value
| Type | Description |
|---|---|
| Color |
Accent4
Represents the accent4 color.
Declaration
public static readonly Color Accent4
Field Value
| Type | Description |
|---|---|
| Color |
Accent5
Represents the accent5 color.
Declaration
public static readonly Color Accent5
Field Value
| Type | Description |
|---|---|
| Color |
Accent6
Represents the accent6 color.
Declaration
public static readonly Color Accent6
Field Value
| Type | Description |
|---|---|
| Color |
AdditionalBackgroundColor
Represents the background2 color.
Declaration
public static readonly Color AdditionalBackgroundColor
Field Value
| Type | Description |
|---|---|
| Color |
AdditionalTextColor
Represents the TextColor color.
Declaration
public static readonly Color AdditionalTextColor
Field Value
| Type | Description |
|---|---|
| Color |
AliceBlue
Gets a system-defined color that has an ARGB value of #F0F8FF.
Declaration
public static readonly Color AliceBlue
Field Value
| Type | Description |
|---|---|
| Color |
AntiqueWhite
Gets a system-defined color that has an ARGB value of #FAEBD7.
Declaration
public static readonly Color AntiqueWhite
Field Value
| Type | Description |
|---|---|
| Color |
Aqua
Gets a system-defined color that has an ARGB value of #00FFFF.
Declaration
public static readonly Color Aqua
Field Value
| Type | Description |
|---|---|
| Color |
Aquamarine
Gets a system-defined color that has an ARGB value of #7FFFD4.
Declaration
public static readonly Color Aquamarine
Field Value
| Type | Description |
|---|---|
| Color |
AutoColor
Represents the hyperlink color.
Declaration
public static readonly Color AutoColor
Field Value
| Type | Description |
|---|---|
| Color |
Azure
Gets a system-defined color that has an ARGB value of #F0FFFF.
Declaration
public static readonly Color Azure
Field Value
| Type | Description |
|---|---|
| Color |
Background1
Represents the background1 color.
Declaration
public static readonly Color Background1
Field Value
| Type | Description |
|---|---|
| Color |
Background2
Represents the background2 color.
Declaration
public static readonly Color Background2
Field Value
| Type | Description |
|---|---|
| Color |
BackgroundColor
Represents the background2 color.
Declaration
public static readonly Color BackgroundColor
Field Value
| Type | Description |
|---|---|
| Color |
Beige
Gets a system-defined color that has an ARGB value of #F5F5DC.
Declaration
public static readonly Color Beige
Field Value
| Type | Description |
|---|---|
| Color |
Bisque
Gets a system-defined color that has an ARGB value of #FFE4C4.
Declaration
public static readonly Color Bisque
Field Value
| Type | Description |
|---|---|
| Color |
Black
Gets a system-defined color that has an ARGB value of #FF000000.
Declaration
public static readonly Color Black
Field Value
| Type | Description |
|---|---|
| Color |
BlanchedAlmond
Gets a system-defined color that has an ARGB value of #FFEBCD.
Declaration
public static readonly Color BlanchedAlmond
Field Value
| Type | Description |
|---|---|
| Color |
Blue
Gets a system-defined color that has an ARGB value of #0000FF.
Declaration
public static readonly Color Blue
Field Value
| Type | Description |
|---|---|
| Color |
BlueViolet
Gets a system-defined color that has an ARGB value of #8A2BE2.
Declaration
public static readonly Color BlueViolet
Field Value
| Type | Description |
|---|---|
| Color |
Brown
Gets a system-defined color that has an ARGB value of #A52A2A.
Declaration
public static readonly Color Brown
Field Value
| Type | Description |
|---|---|
| Color |
BurlyWood
Gets a system-defined color that has an ARGB value of #DEB887.
Declaration
public static readonly Color BurlyWood
Field Value
| Type | Description |
|---|---|
| Color |
CadetBlue
Gets a system-defined color that has an ARGB value of #5F9EA0.
Declaration
public static readonly Color CadetBlue
Field Value
| Type | Description |
|---|---|
| Color |
Chartreuse
Gets a system-defined color that has an ARGB value of #7FFF00.
Declaration
public static readonly Color Chartreuse
Field Value
| Type | Description |
|---|---|
| Color |
Chocolate
Gets a system-defined color that has an ARGB value of #D2691E.
Declaration
public static readonly Color Chocolate
Field Value
| Type | Description |
|---|---|
| Color |
Coral
Gets a system-defined color that has an ARGB value of #FF7F50.
Declaration
public static readonly Color Coral
Field Value
| Type | Description |
|---|---|
| Color |
CornflowerBlue
Gets a system-defined color that has an ARGB value of #6495ED.
Declaration
public static readonly Color CornflowerBlue
Field Value
| Type | Description |
|---|---|
| Color |
Cornsilk
Gets a system-defined color that has an ARGB value of #FFF8DC.
Declaration
public static readonly Color Cornsilk
Field Value
| Type | Description |
|---|---|
| Color |
Crimson
Gets a system-defined color that has an ARGB value of #DC143C.
Declaration
public static readonly Color Crimson
Field Value
| Type | Description |
|---|---|
| Color |
Cyan
Gets a system-defined color that has an ARGB value of #00FFFF.
Declaration
public static readonly Color Cyan
Field Value
| Type | Description |
|---|---|
| Color |
Dark1
Represents the dark1 color.
Declaration
public static readonly Color Dark1
Field Value
| Type | Description |
|---|---|
| Color |
Dark2
Represents the dark2 color.
Declaration
public static readonly Color Dark2
Field Value
| Type | Description |
|---|---|
| Color |
DarkBlue
Gets a system-defined color that has an ARGB value of #00008B.
Declaration
public static readonly Color DarkBlue
Field Value
| Type | Description |
|---|---|
| Color |
DarkCyan
Gets a system-defined color that has an ARGB value of #008B8B.
Declaration
public static readonly Color DarkCyan
Field Value
| Type | Description |
|---|---|
| Color |
DarkGoldenrod
Gets a system-defined color that has an ARGB value of #B8860B.
Declaration
public static readonly Color DarkGoldenrod
Field Value
| Type | Description |
|---|---|
| Color |
DarkGray
Gets a system-defined color that has an ARGB value of #A9A9A9.
Declaration
public static readonly Color DarkGray
Field Value
| Type | Description |
|---|---|
| Color |
DarkGreen
Gets a system-defined color that has an ARGB value of #006400.
Declaration
public static readonly Color DarkGreen
Field Value
| Type | Description |
|---|---|
| Color |
DarkKhaki
Gets a system-defined color that has an ARGB value of #BDB76B.
Declaration
public static readonly Color DarkKhaki
Field Value
| Type | Description |
|---|---|
| Color |
DarkMagenta
Gets a system-defined color that has an ARGB value of #8B008B.
Declaration
public static readonly Color DarkMagenta
Field Value
| Type | Description |
|---|---|
| Color |
DarkOliveGreen
Gets a system-defined color that has an ARGB value of #556B2F.
Declaration
public static readonly Color DarkOliveGreen
Field Value
| Type | Description |
|---|---|
| Color |
DarkOrange
Gets a system-defined color that has an ARGB value of #FF8C00.
Declaration
public static readonly Color DarkOrange
Field Value
| Type | Description |
|---|---|
| Color |
DarkOrchid
Gets a system-defined color that has an ARGB value of #9932CC.
Declaration
public static readonly Color DarkOrchid
Field Value
| Type | Description |
|---|---|
| Color |
DarkRed
Gets a system-defined color that has an ARGB value of #8B0000.
Declaration
public static readonly Color DarkRed
Field Value
| Type | Description |
|---|---|
| Color |
DarkSalmon
Gets a system-defined color that has an ARGB value of #E9967A.
Declaration
public static readonly Color DarkSalmon
Field Value
| Type | Description |
|---|---|
| Color |
DarkSeaGreen
Gets a system-defined color that has an ARGB value of #8FBC8B.
Declaration
public static readonly Color DarkSeaGreen
Field Value
| Type | Description |
|---|---|
| Color |
DarkSlateBlue
Gets a system-defined color that has an ARGB value of #483D8B.
Declaration
public static readonly Color DarkSlateBlue
Field Value
| Type | Description |
|---|---|
| Color |
DarkSlateGray
Gets a system-defined color that has an ARGB value of #2F4F4F.
Declaration
public static readonly Color DarkSlateGray
Field Value
| Type | Description |
|---|---|
| Color |
DarkTurquoise
Gets a system-defined color that has an ARGB value of #00CED1.
Declaration
public static readonly Color DarkTurquoise
Field Value
| Type | Description |
|---|---|
| Color |
DarkViolet
Gets a system-defined color that has an ARGB value of #9400D3.
Declaration
public static readonly Color DarkViolet
Field Value
| Type | Description |
|---|---|
| Color |
DeepPink
Gets a system-defined color that has an ARGB value of #FF1493.
Declaration
public static readonly Color DeepPink
Field Value
| Type | Description |
|---|---|
| Color |
DeepSkyBlue
Gets a system-defined color that has an ARGB value of #00BFFF.
Declaration
public static readonly Color DeepSkyBlue
Field Value
| Type | Description |
|---|---|
| Color |
DimGray
Gets a system-defined color that has an ARGB value of #696969.
Declaration
public static readonly Color DimGray
Field Value
| Type | Description |
|---|---|
| Color |
DodgerBlue
Gets a system-defined color that has an ARGB value of #1E90FF.
Declaration
public static readonly Color DodgerBlue
Field Value
| Type | Description |
|---|---|
| Color |
Empty
Represents a color that is null.
Declaration
public static readonly Color Empty
Field Value
| Type | Description |
|---|---|
| Color |
ExtraSchemeColor1
Represents the hyperlink color.
Declaration
public static readonly Color ExtraSchemeColor1
Field Value
| Type | Description |
|---|---|
| Color |
ExtraSchemeColor2
Represents the hyperlink color.
Declaration
public static readonly Color ExtraSchemeColor2
Field Value
| Type | Description |
|---|---|
| Color |
ExtraSchemeColor3
Represents the hyperlink color.
Declaration
public static readonly Color ExtraSchemeColor3
Field Value
| Type | Description |
|---|---|
| Color |
ExtraSchemeColor4
Represents the hyperlink color.
Declaration
public static readonly Color ExtraSchemeColor4
Field Value
| Type | Description |
|---|---|
| Color |
ExtraSchemeColor5
Represents the hyperlink color.
Declaration
public static readonly Color ExtraSchemeColor5
Field Value
| Type | Description |
|---|---|
| Color |
ExtraSchemeColor6
Represents the hyperlink color.
Declaration
public static readonly Color ExtraSchemeColor6
Field Value
| Type | Description |
|---|---|
| Color |
Firebrick
Gets a system-defined color that has an ARGB value of #B22222.
Declaration
public static readonly Color Firebrick
Field Value
| Type | Description |
|---|---|
| Color |
FloralWhite
Gets a system-defined color that has an ARGB value of #FFFAF0.
Declaration
public static readonly Color FloralWhite
Field Value
| Type | Description |
|---|---|
| Color |
FollowedHyperlink
Represents the followed hyperlink color.
Declaration
public static readonly Color FollowedHyperlink
Field Value
| Type | Description |
|---|---|
| Color |
ForestGreen
Gets a system-defined color that has an ARGB value of #228B22.
Declaration
public static readonly Color ForestGreen
Field Value
| Type | Description |
|---|---|
| Color |
Fuchsia
Gets a system-defined color that has an ARGB value of #FF00FF.
Declaration
public static readonly Color Fuchsia
Field Value
| Type | Description |
|---|---|
| Color |
Gainsboro
Gets a system-defined color that has an ARGB value of #DCDCDC.
Declaration
public static readonly Color Gainsboro
Field Value
| Type | Description |
|---|---|
| Color |
GhostWhite
Gets a system-defined color that has an ARGB value of #F8F8FF.
Declaration
public static readonly Color GhostWhite
Field Value
| Type | Description |
|---|---|
| Color |
Gold
Gets a system-defined color that has an ARGB value of #FFD700.
Declaration
public static readonly Color Gold
Field Value
| Type | Description |
|---|---|
| Color |
Goldenrod
Gets a system-defined color that has an ARGB value of #DAA520.
Declaration
public static readonly Color Goldenrod
Field Value
| Type | Description |
|---|---|
| Color |
Gray
Gets a system-defined color that has an ARGB value of #808080.
Declaration
public static readonly Color Gray
Field Value
| Type | Description |
|---|---|
| Color |
Green
Gets a system-defined color that has an ARGB value of #008000.
Declaration
public static readonly Color Green
Field Value
| Type | Description |
|---|---|
| Color |
GreenYellow
Gets a system-defined color that has an ARGB value of #ADFF2F.
Declaration
public static readonly Color GreenYellow
Field Value
| Type | Description |
|---|---|
| Color |
Honeydew
Gets a system-defined color that has an ARGB value of #F0FFF0.
Declaration
public static readonly Color Honeydew
Field Value
| Type | Description |
|---|---|
| Color |
HotPink
Gets a system-defined color that has an ARGB value of #FF69B4.
Declaration
public static readonly Color HotPink
Field Value
| Type | Description |
|---|---|
| Color |
Hyperlink
Represents the hyperlink color.
Declaration
public static readonly Color Hyperlink
Field Value
| Type | Description |
|---|---|
| Color |
HyperlinkColor
Represents the hyperlink color.
Declaration
public static readonly Color HyperlinkColor
Field Value
| Type | Description |
|---|---|
| Color |
IndianRed
Gets a system-defined color that has an ARGB value of #CD5C5C.
Declaration
public static readonly Color IndianRed
Field Value
| Type | Description |
|---|---|
| Color |
Indigo
Gets a system-defined color that has an ARGB value of #4B0082.
Declaration
public static readonly Color Indigo
Field Value
| Type | Description |
|---|---|
| Color |
Ivory
Gets a system-defined color that has an ARGB value of #FFFFF0.
Declaration
public static readonly Color Ivory
Field Value
| Type | Description |
|---|---|
| Color |
Khaki
Gets a system-defined color that has an ARGB value of #F0E68C.
Declaration
public static readonly Color Khaki
Field Value
| Type | Description |
|---|---|
| Color |
Lavender
Gets a system-defined color that has an ARGB value of #E6E6FA.
Declaration
public static readonly Color Lavender
Field Value
| Type | Description |
|---|---|
| Color |
LavenderBlush
Gets a system-defined color that has an ARGB value of #FFF0F5.
Declaration
public static readonly Color LavenderBlush
Field Value
| Type | Description |
|---|---|
| Color |
LawnGreen
Gets a system-defined color that has an ARGB value of #7CFC00.
Declaration
public static readonly Color LawnGreen
Field Value
| Type | Description |
|---|---|
| Color |
LemonChiffon
Gets a system-defined color that has an ARGB value of #FFFACD.
Declaration
public static readonly Color LemonChiffon
Field Value
| Type | Description |
|---|---|
| Color |
Light1
Represents the light1 color.
Declaration
public static readonly Color Light1
Field Value
| Type | Description |
|---|---|
| Color |
Light2
Represents the light2 color.
Declaration
public static readonly Color Light2
Field Value
| Type | Description |
|---|---|
| Color |
LightBlue
Gets a system-defined color that has an ARGB value of #ADD8E6.
Declaration
public static readonly Color LightBlue
Field Value
| Type | Description |
|---|---|
| Color |
LightCoral
Gets a system-defined color that has an ARGB value of #F08080.
Declaration
public static readonly Color LightCoral
Field Value
| Type | Description |
|---|---|
| Color |
LightCyan
Gets a system-defined color that has an ARGB value of #E0FFFF.
Declaration
public static readonly Color LightCyan
Field Value
| Type | Description |
|---|---|
| Color |
LightGoldenrodYellow
Gets a system-defined color that has an ARGB value of #FAFAD2.
Declaration
public static readonly Color LightGoldenrodYellow
Field Value
| Type | Description |
|---|---|
| Color |
LightGray
Gets a system-defined color that has an ARGB value of #D3D3D3.
Declaration
public static readonly Color LightGray
Field Value
| Type | Description |
|---|---|
| Color |
LightGreen
Gets a system-defined color that has an ARGB value of #90EE90.
Declaration
public static readonly Color LightGreen
Field Value
| Type | Description |
|---|---|
| Color |
LightPink
Gets a system-defined color that has an ARGB value of #FFB6C1.
Declaration
public static readonly Color LightPink
Field Value
| Type | Description |
|---|---|
| Color |
LightSalmon
Gets a system-defined color that has an ARGB value of #FFA07A.
Declaration
public static readonly Color LightSalmon
Field Value
| Type | Description |
|---|---|
| Color |
LightSeaGreen
Gets a system-defined color that has an ARGB value of #20B2AA.
Declaration
public static readonly Color LightSeaGreen
Field Value
| Type | Description |
|---|---|
| Color |
LightSkyBlue
Gets a system-defined color that has an ARGB value of #87CEFA.
Declaration
public static readonly Color LightSkyBlue
Field Value
| Type | Description |
|---|---|
| Color |
LightSlateGray
Gets a system-defined color that has an ARGB value of #778899.
Declaration
public static readonly Color LightSlateGray
Field Value
| Type | Description |
|---|---|
| Color |
LightSteelBlue
Gets a system-defined color that has an ARGB value of #B0C4DE.
Declaration
public static readonly Color LightSteelBlue
Field Value
| Type | Description |
|---|---|
| Color |
LightYellow
Gets a system-defined color that has an ARGB value of #FFFFE0.
Declaration
public static readonly Color LightYellow
Field Value
| Type | Description |
|---|---|
| Color |
Lime
Gets a system-defined color that has an ARGB value of #00FF00.
Declaration
public static readonly Color Lime
Field Value
| Type | Description |
|---|---|
| Color |
LimeGreen
Gets a system-defined color that has an ARGB value of #32CD32.
Declaration
public static readonly Color LimeGreen
Field Value
| Type | Description |
|---|---|
| Color |
Linen
Gets a system-defined color that has an ARGB value of #FAF0E6.
Declaration
public static readonly Color Linen
Field Value
| Type | Description |
|---|---|
| Color |
Magenta
Gets a system-defined color that has an ARGB value of #FF00FF.
Declaration
public static readonly Color Magenta
Field Value
| Type | Description |
|---|---|
| Color |
MainDarkColor1
Represents the hyperlink color.
Declaration
public static readonly Color MainDarkColor1
Field Value
| Type | Description |
|---|---|
| Color |
MainDarkColor2
Represents the hyperlink color.
Declaration
public static readonly Color MainDarkColor2
Field Value
| Type | Description |
|---|---|
| Color |
MainLightColor1
Represents the hyperlink color.
Declaration
public static readonly Color MainLightColor1
Field Value
| Type | Description |
|---|---|
| Color |
MainLightColor2
Represents the hyperlink color.
Declaration
public static readonly Color MainLightColor2
Field Value
| Type | Description |
|---|---|
| Color |
Maroon
Gets a system-defined color that has an ARGB value of #800000.
Declaration
public static readonly Color Maroon
Field Value
| Type | Description |
|---|---|
| Color |
MediumAquamarine
Gets a system-defined color that has an ARGB value of #66CDAA.
Declaration
public static readonly Color MediumAquamarine
Field Value
| Type | Description |
|---|---|
| Color |
MediumBlue
Gets a system-defined color that has an ARGB value of #0000CD.
Declaration
public static readonly Color MediumBlue
Field Value
| Type | Description |
|---|---|
| Color |
MediumOrchid
Gets a system-defined color that has an ARGB value of #BA55D3.
Declaration
public static readonly Color MediumOrchid
Field Value
| Type | Description |
|---|---|
| Color |
MediumPurple
Gets a system-defined color that has an ARGB value of #9370DB.
Declaration
public static readonly Color MediumPurple
Field Value
| Type | Description |
|---|---|
| Color |
MediumSeaGreen
Gets a system-defined color that has an ARGB value of #3CB371.
Declaration
public static readonly Color MediumSeaGreen
Field Value
| Type | Description |
|---|---|
| Color |
MediumSlateBlue
Gets a system-defined color that has an ARGB value of #7B68EE.
Declaration
public static readonly Color MediumSlateBlue
Field Value
| Type | Description |
|---|---|
| Color |
MediumSpringGreen
Gets a system-defined color that has an ARGB value of #00FA9A.
Declaration
public static readonly Color MediumSpringGreen
Field Value
| Type | Description |
|---|---|
| Color |
MediumTurquoise
Gets a system-defined color that has an ARGB value of #48D1CC.
Declaration
public static readonly Color MediumTurquoise
Field Value
| Type | Description |
|---|---|
| Color |
MediumVioletRed
Gets a system-defined color that has an ARGB value of #C71585.
Declaration
public static readonly Color MediumVioletRed
Field Value
| Type | Description |
|---|---|
| Color |
MidnightBlue
Gets a system-defined color that has an ARGB value of #191970.
Declaration
public static readonly Color MidnightBlue
Field Value
| Type | Description |
|---|---|
| Color |
MintCream
Gets a system-defined color that has an ARGB value of #F5FFFA.
Declaration
public static readonly Color MintCream
Field Value
| Type | Description |
|---|---|
| Color |
MistyRose
Gets a system-defined color that has an ARGB value of #FFE4E1.
Declaration
public static readonly Color MistyRose
Field Value
| Type | Description |
|---|---|
| Color |
Moccasin
Gets a system-defined color that has an ARGB value of #FFE4B5.
Declaration
public static readonly Color Moccasin
Field Value
| Type | Description |
|---|---|
| Color |
NavajoWhite
Gets a system-defined color that has an ARGB value of #FFDEAD.
Declaration
public static readonly Color NavajoWhite
Field Value
| Type | Description |
|---|---|
| Color |
Navy
Gets a system-defined color that has an ARGB value of #000080.
Declaration
public static readonly Color Navy
Field Value
| Type | Description |
|---|---|
| Color |
None
Represents none as the color.
Declaration
public static readonly Color None
Field Value
| Type | Description |
|---|---|
| Color |
OldLace
Gets a system-defined color that has an ARGB value of #FDF5E6.
Declaration
public static readonly Color OldLace
Field Value
| Type | Description |
|---|---|
| Color |
Olive
Gets a system-defined color that has an ARGB value of #808000.
Declaration
public static readonly Color Olive
Field Value
| Type | Description |
|---|---|
| Color |
OliveDrab
Gets a system-defined color that has an ARGB value of #6B8E23.
Declaration
public static readonly Color OliveDrab
Field Value
| Type | Description |
|---|---|
| Color |
Orange
Gets a system-defined color that has an ARGB value of #FFA500.
Declaration
public static readonly Color Orange
Field Value
| Type | Description |
|---|---|
| Color |
OrangeRed
Gets a system-defined color that has an ARGB value of #FF4500.
Declaration
public static readonly Color OrangeRed
Field Value
| Type | Description |
|---|---|
| Color |
Orchid
Gets a system-defined color that has an ARGB value of #DA70D6.
Declaration
public static readonly Color Orchid
Field Value
| Type | Description |
|---|---|
| Color |
PaleGoldenrod
Gets a system-defined color that has an ARGB value of #EEE8AA.
Declaration
public static readonly Color PaleGoldenrod
Field Value
| Type | Description |
|---|---|
| Color |
PaleGreen
Gets a system-defined color that has an ARGB value of #98FB98.
Declaration
public static readonly Color PaleGreen
Field Value
| Type | Description |
|---|---|
| Color |
PaleTurquoise
Gets a system-defined color that has an ARGB value of #AFEEEE.
Declaration
public static readonly Color PaleTurquoise
Field Value
| Type | Description |
|---|---|
| Color |
PaleVioletRed
Gets a system-defined color that has an ARGB value of #DB7093.
Declaration
public static readonly Color PaleVioletRed
Field Value
| Type | Description |
|---|---|
| Color |
PapayaWhip
Gets a system-defined color that has an ARGB value of #FFEFD5.
Declaration
public static readonly Color PapayaWhip
Field Value
| Type | Description |
|---|---|
| Color |
PeachPuff
Gets a system-defined color that has an ARGB value of #FFDAB9.
Declaration
public static readonly Color PeachPuff
Field Value
| Type | Description |
|---|---|
| Color |
Peru
Gets a system-defined color that has an ARGB value of #CD853F.
Declaration
public static readonly Color Peru
Field Value
| Type | Description |
|---|---|
| Color |
Pink
Gets a system-defined color that has an ARGB value of #FFC0CB.
Declaration
public static readonly Color Pink
Field Value
| Type | Description |
|---|---|
| Color |
Plum
Gets a system-defined color that has an ARGB value of #DDA0DD.
Declaration
public static readonly Color Plum
Field Value
| Type | Description |
|---|---|
| Color |
PowderBlue
Gets a system-defined color that has an ARGB value of #B0E0E6.
Declaration
public static readonly Color PowderBlue
Field Value
| Type | Description |
|---|---|
| Color |
Purple
Gets a system-defined color that has an ARGB value of #800080.
Declaration
public static readonly Color Purple
Field Value
| Type | Description |
|---|---|
| Color |
RebeccaPurple
Gets a system-defined color that has an ARGB value of #663399.
Declaration
public static readonly Color RebeccaPurple
Field Value
| Type | Description |
|---|---|
| Color |
Red
Gets a system-defined color that has an ARGB value of #FF0000.
Declaration
public static readonly Color Red
Field Value
| Type | Description |
|---|---|
| Color |
RosyBrown
Gets a system-defined color that has an ARGB value of #BC8F8F.
Declaration
public static readonly Color RosyBrown
Field Value
| Type | Description |
|---|---|
| Color |
RoyalBlue
Gets a system-defined color that has an ARGB value of #4169E1.
Declaration
public static readonly Color RoyalBlue
Field Value
| Type | Description |
|---|---|
| Color |
SaddleBrown
Gets a system-defined color that has an ARGB value of #8B4513.
Declaration
public static readonly Color SaddleBrown
Field Value
| Type | Description |
|---|---|
| Color |
Salmon
Gets a system-defined color that has an ARGB value of #FA8072.
Declaration
public static readonly Color Salmon
Field Value
| Type | Description |
|---|---|
| Color |
SandyBrown
Gets a system-defined color that has an ARGB value of #F4A460.
Declaration
public static readonly Color SandyBrown
Field Value
| Type | Description |
|---|---|
| Color |
SeaGreen
Gets a system-defined color that has an ARGB value of #2E8B57.
Declaration
public static readonly Color SeaGreen
Field Value
| Type | Description |
|---|---|
| Color |
SeaShell
Gets a system-defined color that has an ARGB value of #FFF5EE.
Declaration
public static readonly Color SeaShell
Field Value
| Type | Description |
|---|---|
| Color |
Sienna
Gets a system-defined color that has an ARGB value of #A0522D.
Declaration
public static readonly Color Sienna
Field Value
| Type | Description |
|---|---|
| Color |
Silver
Gets a system-defined color that has an ARGB value of #C0C0C0.
Declaration
public static readonly Color Silver
Field Value
| Type | Description |
|---|---|
| Color |
SkyBlue
Gets a system-defined color that has an ARGB value of #87CEEB.
Declaration
public static readonly Color SkyBlue
Field Value
| Type | Description |
|---|---|
| Color |
SlateBlue
Gets a system-defined color that has an ARGB value of #6A5ACD.
Declaration
public static readonly Color SlateBlue
Field Value
| Type | Description |
|---|---|
| Color |
SlateGray
Gets a system-defined color that has an ARGB value of #708090.
Declaration
public static readonly Color SlateGray
Field Value
| Type | Description |
|---|---|
| Color |
Snow
Gets a system-defined color that has an ARGB value of #FFFAFA.
Declaration
public static readonly Color Snow
Field Value
| Type | Description |
|---|---|
| Color |
SpringGreen
Gets a system-defined color that has an ARGB value of #00FF7F.
Declaration
public static readonly Color SpringGreen
Field Value
| Type | Description |
|---|---|
| Color |
SteelBlue
Gets a system-defined color that has an ARGB value of #4682B4.
Declaration
public static readonly Color SteelBlue
Field Value
| Type | Description |
|---|---|
| Color |
Tan
Gets a system-defined color that has an ARGB value of #D2B48C.
Declaration
public static readonly Color Tan
Field Value
| Type | Description |
|---|---|
| Color |
Teal
Gets a system-defined color that has an ARGB value of #008080.
Declaration
public static readonly Color Teal
Field Value
| Type | Description |
|---|---|
| Color |
Text1
Represents the text1 color.
Declaration
public static readonly Color Text1
Field Value
| Type | Description |
|---|---|
| Color |
Text2
Represents the text2 color.
Declaration
public static readonly Color Text2
Field Value
| Type | Description |
|---|---|
| Color |
TextColor
Represents the TextColor color.
Declaration
public static readonly Color TextColor
Field Value
| Type | Description |
|---|---|
| Color |
Thistle
Gets a system-defined color that has an ARGB value of #D2B48C.
Declaration
public static readonly Color Thistle
Field Value
| Type | Description |
|---|---|
| Color |
Tomato
Gets a system-defined color that has an ARGB value of #FF6347.
Declaration
public static readonly Color Tomato
Field Value
| Type | Description |
|---|---|
| Color |
Transparent
Gets a system-defined color that has an ARGB value of #00FFFFFF.
Declaration
public static readonly Color Transparent
Field Value
| Type | Description |
|---|---|
| Color |
Turquoise
Gets a system-defined color that has an ARGB value of #40E0D0.
Declaration
public static readonly Color Turquoise
Field Value
| Type | Description |
|---|---|
| Color |
Violet
Gets a system-defined color that has an ARGB value of #EE82EE.
Declaration
public static readonly Color Violet
Field Value
| Type | Description |
|---|---|
| Color |
Wheat
Gets a system-defined color that has an ARGB value of #F5DEB3.
Declaration
public static readonly Color Wheat
Field Value
| Type | Description |
|---|---|
| Color |
White
Gets a system-defined color that has an ARGB value of #FFFFFF.
Declaration
public static readonly Color White
Field Value
| Type | Description |
|---|---|
| Color |
WhiteSmoke
Gets a system-defined color that has an ARGB value of #F5F5F5.
Declaration
public static readonly Color WhiteSmoke
Field Value
| Type | Description |
|---|---|
| Color |
Yellow
Gets a system-defined color that has an ARGB value of #FFFF00.
Declaration
public static readonly Color Yellow
Field Value
| Type | Description |
|---|---|
| Color |
YellowGreen
Gets a system-defined color that has an ARGB value of #9ACD32.
Declaration
public static readonly Color YellowGreen
Field Value
| Type | Description |
|---|---|
| Color | A Color representing a system-defined color. |
Properties
A
Gets the alpha component value of this Color structure.
Declaration
public byte A { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
B
Gets the blue component value of this Color structure.
Declaration
public byte B { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
ColorType
Gets or set the Type of the Color structure.
Declaration
public ColorTypeValues ColorType { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorTypeValues |
ColorValue
Gets the color value represented by this Color.
Declaration
public string ColorValue { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
G
Gets the green component value of this Color structure.
Declaration
public byte G { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
LuminanceModulation
Gets or set the Luminance Modulation value of this Color structure.
Declaration
public Nullable<int> LuminanceModulation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
LuminanceOffset
Gets or set the Luminance Offset value of this Color structure.
Declaration
public Nullable<int> LuminanceOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
R
Gets the red component value of this Color structure.
Declaration
public byte R { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
SaturationModulation
Gets or set the amount of saturation modulation applied to the this Color structure.
Declaration
public Nullable<int> SaturationModulation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
SchemaColor
Gets the Schema color value represented by this Color.
Declaration
public SchemeColorValues SchemaColor { get; }
Property Value
| Type | Description |
|---|---|
| SchemeColorValues |
ThemeColorValue
Gets the Theme color value represented by this Color.
Declaration
public ThemeColorValues ThemeColorValue { get; }
Property Value
| Type | Description |
|---|---|
| ThemeColorValues |
Methods
Equals(Object)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the current object is equal to other; otherwise, false. |
FromArgb(Int32)
Creates a Color structure from a 32-bit ARGB value.
Declaration
public static Color FromArgb(int argb)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | argb | A value specifying the 32-bit ARGB value. |
Returns
| Type | Description |
|---|---|
| Color |
See Also
FromArgb(Int32, Color)
Creates a Color structure from the specified Color structure, but with the new specified alpha value.
Although this method allows a 32-bit value to be passed for the alpha value, the value is limited to 8 bits.
Declaration
public static Color FromArgb(int alpha, Color baseColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | alpha | The alpha value for the new Color. Valid values are 0 through 255. |
| Color | baseColor |
Returns
| Type | Description |
|---|---|
| Color |
See Also
FromArgb(Int32, Int32, Int32)
Creates a Color structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.
Declaration
public static Color FromArgb(int red, int green, int blue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | red | The red component value for the new Color. Valid values are 0 through 255. |
| System.Int32 | green | The green component value for the new Color. Valid values are 0 through 255. |
| System.Int32 | blue | The blue component value for the new Color. Valid values are 0 through 255. |
Returns
| Type | Description |
|---|---|
| Color |
See Also
FromArgb(Int32, Int32, Int32, Int32)
Creates a Color structure from the specified 8-bit color values (alpha, red, green, and blue). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.
Declaration
public static Color FromArgb(int alpha, int red, int green, int blue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | alpha | The alpha value for the new Color. Valid values are 0 through 255. |
| System.Int32 | red | The red component value for the new Color. Valid values are 0 through 255. |
| System.Int32 | green | The green component value for the new Color. Valid values are 0 through 255. |
| System.Int32 | blue | The blue component value for the new Color. Valid values are 0 through 255. |
Returns
| Type | Description |
|---|---|
| Color |
See Also
GetBrightness()
Calculates the brightness of a color.
Declaration
public double GetBrightness()
Returns
| Type | Description |
|---|---|
| System.Double | The brightness of the color, a value between 0 (black) and 1 (white). |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetLuminance()
Luminance is a value from 0 (black) to 100 (white) where 50 is the perceptual "middle grey". Luminance = 50 is the equivalent of Y = 18.4, or in other words a 18% grey card, representing the middle of a photographic exposure.
Declaration
public double GetLuminance()
Returns
| Type | Description |
|---|---|
| System.Double | Preceived Lightness |
SetAlpha(Int32)
Sets the alpha value for the color.
Declaration
public void SetAlpha(int alpha)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | alpha | The alpha value to set. It must be in the range 0-255. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when the alpha value is not within the valid range (0-255). |
ToArgb()
Gets the 32-bit ARGB value of this Color structure.
Further Documentation:
Code Example
Declaration
public int ToArgb()
Returns
| Type | Description |
|---|---|
| System.Int32 | The 32-bit ARGB value of this Color. |
ToHtmlCssColorCode()
Translates the specified Color structure to an HTML string color representation.
Declaration
public string ToHtmlCssColorCode()
Returns
| Type | Description |
|---|---|
| System.String | A string containing the hex representation of the color in the format #RRGGBB. |
ToString()
Returns the color as a string in the format: #AARRGGBB.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Operators
Equality(Color, Color)
Declaration
public static bool operator ==(Color left, Color right)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | left | |
| Color | right |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Implicit(Color to Color)
Implicitly casts to SixLabors.ImageSharp.Color objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.Color as well.
Declaration
public static implicit operator Color(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.Color |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.Color |
Implicit(Color to Abgr32)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Abgr32 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Abgr32 as well.
Declaration
public static implicit operator Abgr32(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Abgr32 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Abgr32 |
Implicit(Color to Argb32)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Argb32 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Argb32 as well.
Declaration
public static implicit operator Argb32(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Argb32 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Argb32 |
Implicit(Color to Bgr24)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Bgr24 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Bgr24 as well.
Declaration
public static implicit operator Bgr24(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Bgr24 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Bgr24 |
Implicit(Color to Bgra32)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Bgra32 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Bgra32 as well.
Declaration
public static implicit operator Bgra32(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Bgra32 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Bgra32 |
Implicit(Color to Rgb24)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Rgb24 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgb24 as well.
Declaration
public static implicit operator Rgb24(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Rgb24 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgb24 |
Implicit(Color to Rgb48)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Rgb48 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgb48 as well.
Declaration
public static implicit operator Rgb48(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Rgb48 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgb48 |
Implicit(Color to Rgba32)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Rgba32 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgba32 as well.
Declaration
public static implicit operator Rgba32(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Rgba32 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgba32 |
Implicit(Color to Rgba64)
Implicitly casts to SixLabors.ImageSharp.PixelFormats.Rgba64 objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgba64 as well.
Declaration
public static implicit operator Rgba64(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a SixLabors.ImageSharp.PixelFormats.Rgba64 |
Returns
| Type | Description |
|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgba64 |
Implicit(Color to Color)
Implicitly casts to System.Drawing.Color objects from Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support System.Drawing.Color as well.
Declaration
public static implicit operator Color(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color is explicitly cast to a System.Drawing.Color |
Returns
| Type | Description |
|---|---|
| System.Drawing.Color |
Implicit(Color to Color)
Implicitly casts SixLabors.ImageSharp.Color objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.Color as well.
Declaration
public static implicit operator Color(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.Color | color | SixLabors.ImageSharp.Color will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Abgr32 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Abgr32 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Abgr32 as well.
Declaration
public static implicit operator Color(Abgr32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Abgr32 | color | SixLabors.ImageSharp.PixelFormats.Abgr32 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Argb32 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Argb32 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Argb32 as well.
Declaration
public static implicit operator Color(Argb32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Argb32 | color | SixLabors.ImageSharp.PixelFormats.Argb32 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Bgr24 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Bgr24 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Bgr24 as well.
Declaration
public static implicit operator Color(Bgr24 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Bgr24 | color | SixLabors.ImageSharp.PixelFormats.Bgr24 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Bgra32 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Bgra32 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Bgra32 as well.
Declaration
public static implicit operator Color(Bgra32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Bgra32 | color | SixLabors.ImageSharp.PixelFormats.Bgra32 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Rgb24 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Rgb24 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgb24 as well.
Declaration
public static implicit operator Color(Rgb24 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgb24 | color | SixLabors.ImageSharp.PixelFormats.Rgb24 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Rgb48 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Rgb48 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgb48 as well.
Declaration
public static implicit operator Color(Rgb48 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgb48 | color | SixLabors.ImageSharp.PixelFormats.Rgb48 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Rgba32 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Rgba32 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgba32 as well.
Declaration
public static implicit operator Color(Rgba32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgba32 | color | SixLabors.ImageSharp.PixelFormats.Rgba32 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Rgba64 to Color)
Implicitly casts SixLabors.ImageSharp.PixelFormats.Rgba64 objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support SixLabors.ImageSharp.PixelFormats.Rgba64 as well.
Declaration
public static implicit operator Color(Rgba64 color)
Parameters
| Type | Name | Description |
|---|---|---|
| SixLabors.ImageSharp.PixelFormats.Rgba64 | color | SixLabors.ImageSharp.PixelFormats.Rgba64 will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Implicit(Color to Color)
Implicitly casts System.Drawing.Color objects to Color.
When your .NET Class methods use Color as parameters or return types, you now automatically support System.Drawing.Color as well.
Declaration
public static implicit operator Color(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Color | color | System.Drawing.Color will automatically be casted to Color |
Returns
| Type | Description |
|---|---|
| Color |
Inequality(Color, Color)
Tests whether two specified Color structures are different.
Declaration
public static bool operator !=(Color left, Color right)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | left | The Color that is to the left of the inequality operator. |
| Color | right | The Color that is to the right of the inequality operator. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the two Color structures are different; otherwise, false. |