Class DrawingColor
A Color that is used for Shapes, Charts and other drawing objects.
Inherited Members
Namespace: DRIT.Spreadsheet.Drawing
Assembly: DRIT.Spreadsheet.dll
Syntax
public class DrawingColor
Constructors
DrawingColor(byte, byte, byte)
Initializes a new instance of the DrawingColor class from RGB color components (0-255 range).
Declaration
public DrawingColor(byte r, byte g, byte b)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | r | The red component (0 to 255). |
| byte | g | The green component (0 to 255). |
| byte | b | The blue component (0 to 255). |
DrawingColor(Color)
Initializes a new instance of the DrawingColor class from a Color.
Declaration
public DrawingColor(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The system drawing color. |
DrawingColor(float, float, float)
Initializes a new instance of the DrawingColor class from RGB color components (0.0-1.0 range).
Declaration
public DrawingColor(float r, float g, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| float | r | The red component (0.0 to 1.0). |
| float | g | The green component (0.0 to 1.0). |
| float | b | The blue component (0.0 to 1.0). |
DrawingColor(string)
Initializes a new instance of the DrawingColor class from a hexadecimal color string.
Declaration
public DrawingColor(string hexColor)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hexColor | The color in hexadecimal format (e.g., "#FF0000" for red). |
Properties
A
Gets the alpha channel (transparency) component of the color.
Declaration
public byte A { get; }
Property Value
| Type | Description |
|---|---|
| byte |
Accent1
Gets a DrawingColor representing the Accent 1 theme color.
Declaration
public static DrawingColor Accent1 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Accent2
Gets a DrawingColor representing the Accent 2 theme color.
Declaration
public static DrawingColor Accent2 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Accent3
Gets a DrawingColor representing the Accent 3 theme color.
Declaration
public static DrawingColor Accent3 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Accent4
Gets a DrawingColor representing the Accent 4 theme color.
Declaration
public static DrawingColor Accent4 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Accent5
Gets a DrawingColor representing the Accent 5 theme color.
Declaration
public static DrawingColor Accent5 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Accent6
Gets a DrawingColor representing the Accent 6 theme color.
Declaration
public static DrawingColor Accent6 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ActiveBorder
Gets a DrawingColor representing the active window border system color.
Declaration
public static DrawingColor ActiveBorder { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ActiveCaption
Gets a DrawingColor representing the active window caption system color.
Declaration
public static DrawingColor ActiveCaption { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
AliceBlue
Gets a DrawingColor representing Alice Blue (preset color).
Declaration
public static DrawingColor AliceBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
AntiqueWhite
Gets a DrawingColor representing Antique White (preset color).
Declaration
public static DrawingColor AntiqueWhite { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
AppWorkspace
Gets a DrawingColor representing the application workspace system color.
Declaration
public static DrawingColor AppWorkspace { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Aqua
Gets a DrawingColor representing Aqua (preset color).
Declaration
public static DrawingColor Aqua { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Aquamarine
Gets a DrawingColor representing Aquamarine (preset color).
Declaration
public static DrawingColor Aquamarine { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Azure
Gets a DrawingColor representing Azure (preset color).
Declaration
public static DrawingColor Azure { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
B
Gets the blue component of the color.
Declaration
public byte B { get; }
Property Value
| Type | Description |
|---|---|
| byte |
Background
Gets a DrawingColor representing the background system color.
Declaration
public static DrawingColor Background { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Background1
Gets a DrawingColor representing the Background 1 theme color.
Declaration
public static DrawingColor Background1 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Background2
Gets a DrawingColor representing the Background 2 theme color.
Declaration
public static DrawingColor Background2 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Beige
Gets a DrawingColor representing Beige (preset color).
Declaration
public static DrawingColor Beige { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Bisque
Gets a DrawingColor representing Bisque (preset color).
Declaration
public static DrawingColor Bisque { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Black
Gets a DrawingColor representing Black (preset color).
Declaration
public static DrawingColor Black { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
BlanchedAlmond
Gets a DrawingColor representing Blanched Almond (preset color).
Declaration
public static DrawingColor BlanchedAlmond { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Blue
Gets a DrawingColor representing Blue (preset color).
Declaration
public static DrawingColor Blue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
BlueViolet
Gets a DrawingColor representing Blue Violet (preset color).
Declaration
public static DrawingColor BlueViolet { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Brown
Gets a DrawingColor representing Brown (preset color).
Declaration
public static DrawingColor Brown { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
BurlyWood
Gets a DrawingColor representing Burly Wood (preset color).
Declaration
public static DrawingColor BurlyWood { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ButtonFace
Gets a DrawingColor representing the button face system color.
Declaration
public static DrawingColor ButtonFace { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ButtonHighlight
Gets a DrawingColor representing the button highlight system color.
Declaration
public static DrawingColor ButtonHighlight { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ButtonShadow
Gets a DrawingColor representing the button shadow system color.
Declaration
public static DrawingColor ButtonShadow { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ButtonText
Gets a DrawingColor representing the button text system color.
Declaration
public static DrawingColor ButtonText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
CadetBlue
Gets a DrawingColor representing Cadet Blue (preset color).
Declaration
public static DrawingColor CadetBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
CaptionText
Gets a DrawingColor representing the caption text system color.
Declaration
public static DrawingColor CaptionText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Chartreuse
Gets a DrawingColor representing Chartreuse (preset color).
Declaration
public static DrawingColor Chartreuse { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Chocolate
Gets a DrawingColor representing Chocolate (preset color).
Declaration
public static DrawingColor Chocolate { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Coral
Gets a DrawingColor representing Coral (preset color).
Declaration
public static DrawingColor Coral { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
CornflowerBlue
Gets a DrawingColor representing Cornflower Blue (preset color).
Declaration
public static DrawingColor CornflowerBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Cornsilk
Gets a DrawingColor representing Cornsilk (preset color).
Declaration
public static DrawingColor Cornsilk { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Crimson
Gets a DrawingColor representing Crimson (preset color).
Declaration
public static DrawingColor Crimson { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Cyan
Gets a DrawingColor representing Cyan (preset color).
Declaration
public static DrawingColor Cyan { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Dark1
Gets a DrawingColor representing the Dark 1 theme color.
Declaration
public static DrawingColor Dark1 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Dark2
Gets a DrawingColor representing the Dark 2 theme color.
Declaration
public static DrawingColor Dark2 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkBlue
Gets a DrawingColor representing Dark Blue (preset color).
Declaration
public static DrawingColor DarkBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkCyan
Gets a DrawingColor representing Dark Cyan (preset color).
Declaration
public static DrawingColor DarkCyan { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkGoldenrod
Gets a DrawingColor representing Dark Goldenrod (preset color).
Declaration
public static DrawingColor DarkGoldenrod { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkGray
Gets a DrawingColor representing Dark Gray (preset color).
Declaration
public static DrawingColor DarkGray { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkGreen
Gets a DrawingColor representing Dark Green (preset color).
Declaration
public static DrawingColor DarkGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkKhaki
Gets a DrawingColor representing Dark Khaki (preset color).
Declaration
public static DrawingColor DarkKhaki { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkMagenta
Gets a DrawingColor representing Dark Magenta (preset color).
Declaration
public static DrawingColor DarkMagenta { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkOliveGreen
Gets a DrawingColor representing Dark Olive Green (preset color).
Declaration
public static DrawingColor DarkOliveGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkOrange
Gets a DrawingColor representing Dark Orange (preset color).
Declaration
public static DrawingColor DarkOrange { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkOrchid
Gets a DrawingColor representing Dark Orchid (preset color).
Declaration
public static DrawingColor DarkOrchid { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkRed
Gets a DrawingColor representing Dark Red (preset color).
Declaration
public static DrawingColor DarkRed { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkSalmon
Gets a DrawingColor representing Dark Salmon (preset color).
Declaration
public static DrawingColor DarkSalmon { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkSeaGreen
Gets a DrawingColor representing Dark Sea Green (preset color).
Declaration
public static DrawingColor DarkSeaGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkShadow3D
Gets a DrawingColor representing the dark shadow 3D system color.
Declaration
public static DrawingColor DarkShadow3D { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkSlateBlue
Gets a DrawingColor representing Dark Slate Blue (preset color).
Declaration
public static DrawingColor DarkSlateBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkSlateGray
Gets a DrawingColor representing Dark Slate Gray (preset color).
Declaration
public static DrawingColor DarkSlateGray { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkTurquoise
Gets a DrawingColor representing Dark Turquoise (preset color).
Declaration
public static DrawingColor DarkTurquoise { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DarkViolet
Gets a DrawingColor representing Dark Violet (preset color).
Declaration
public static DrawingColor DarkViolet { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DeepPink
Gets a DrawingColor representing Deep Pink (preset color).
Declaration
public static DrawingColor DeepPink { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DeepSkyBlue
Gets a DrawingColor representing Deep Sky Blue (preset color).
Declaration
public static DrawingColor DeepSkyBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DimGray
Gets a DrawingColor representing Dim Gray (preset color).
Declaration
public static DrawingColor DimGray { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
DodgerBlue
Gets a DrawingColor representing Dodger Blue (preset color).
Declaration
public static DrawingColor DodgerBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Firebrick
Gets a DrawingColor representing Firebrick (preset color).
Declaration
public static DrawingColor Firebrick { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
FloralWhite
Gets a DrawingColor representing Floral White (preset color).
Declaration
public static DrawingColor FloralWhite { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
FollowedHyperlink
Gets a DrawingColor representing the Followed Hyperlink theme color.
Declaration
public static DrawingColor FollowedHyperlink { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ForestGreen
Gets a DrawingColor representing Forest Green (preset color).
Declaration
public static DrawingColor ForestGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Fuchsia
Gets a DrawingColor representing Fuchsia (preset color).
Declaration
public static DrawingColor Fuchsia { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
G
Gets the green component of the color.
Declaration
public byte G { get; }
Property Value
| Type | Description |
|---|---|
| byte |
Gainsboro
Gets a DrawingColor representing Gainsboro (preset color).
Declaration
public static DrawingColor Gainsboro { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
GhostWhite
Gets a DrawingColor representing Ghost White (preset color).
Declaration
public static DrawingColor GhostWhite { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Gold
Gets a DrawingColor representing Gold (preset color).
Declaration
public static DrawingColor Gold { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Goldenrod
Gets a DrawingColor representing Goldenrod (preset color).
Declaration
public static DrawingColor Goldenrod { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
GradientActiveCaption
Gets a DrawingColor representing the gradient active caption system color.
Declaration
public static DrawingColor GradientActiveCaption { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
GradientInactiveCaption
Gets a DrawingColor representing the gradient inactive caption system color.
Declaration
public static DrawingColor GradientInactiveCaption { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Gray
Gets a DrawingColor representing Gray (preset color).
Declaration
public static DrawingColor Gray { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
GrayText
Gets a DrawingColor representing the gray text system color.
Declaration
public static DrawingColor GrayText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Green
Gets a DrawingColor representing Green (preset color).
Declaration
public static DrawingColor Green { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
GreenYellow
Gets a DrawingColor representing Green Yellow (preset color).
Declaration
public static DrawingColor GreenYellow { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
H
Gets the hue component of the color (for HSL colors).
Declaration
public double H { get; }
Property Value
| Type | Description |
|---|---|
| double |
HexColor
Gets the hexadecimal string representation of this color.
Declaration
public string HexColor { get; }
Property Value
| Type | Description |
|---|---|
| string |
Highlight
Gets a DrawingColor representing the highlight system color.
Declaration
public static DrawingColor Highlight { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
HighlightText
Gets a DrawingColor representing the highlight text system color.
Declaration
public static DrawingColor HighlightText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Honeydew
Gets a DrawingColor representing Honeydew (preset color).
Declaration
public static DrawingColor Honeydew { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
HotLight
Gets a DrawingColor representing the hot light system color.
Declaration
public static DrawingColor HotLight { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
HotPink
Gets a DrawingColor representing Hot Pink (preset color).
Declaration
public static DrawingColor HotPink { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Hyperlink
Gets a DrawingColor representing the Hyperlink theme color.
Declaration
public static DrawingColor Hyperlink { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
InactiveBorder
Gets a DrawingColor representing the inactive border system color.
Declaration
public static DrawingColor InactiveBorder { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
InactiveCaption
Gets a DrawingColor representing the inactive caption system color.
Declaration
public static DrawingColor InactiveCaption { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
InactiveCaptionText
Gets a DrawingColor representing the inactive caption text system color.
Declaration
public static DrawingColor InactiveCaptionText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
IndianRed
Gets a DrawingColor representing Indian Red (preset color).
Declaration
public static DrawingColor IndianRed { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Indigo
Gets a DrawingColor representing Indigo (preset color).
Declaration
public static DrawingColor Indigo { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
InfoBk
Gets a DrawingColor representing the info background system color.
Declaration
public static DrawingColor InfoBk { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
InfoText
Gets a DrawingColor representing the info text system color.
Declaration
public static DrawingColor InfoText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Ivory
Gets a DrawingColor representing Ivory (preset color).
Declaration
public static DrawingColor Ivory { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Khaki
Gets a DrawingColor representing Khaki (preset color).
Declaration
public static DrawingColor Khaki { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
L
Gets the luminance component of the color (for HSL colors).
Declaration
public double L { get; }
Property Value
| Type | Description |
|---|---|
| double |
Lavender
Gets a DrawingColor representing Lavender (preset color).
Declaration
public static DrawingColor Lavender { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LavenderBlush
Gets a DrawingColor representing Lavender Blush (preset color).
Declaration
public static DrawingColor LavenderBlush { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LawnGreen
Gets a DrawingColor representing Lawn Green (preset color).
Declaration
public static DrawingColor LawnGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LemonChiffon
Gets a DrawingColor representing Lemon Chiffon (preset color).
Declaration
public static DrawingColor LemonChiffon { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Light1
Gets a DrawingColor representing the Light 1 theme color.
Declaration
public static DrawingColor Light1 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Light2
Gets a DrawingColor representing the Light 2 theme color.
Declaration
public static DrawingColor Light2 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Light3D
Gets a DrawingColor representing the light 3D system color.
Declaration
public static DrawingColor Light3D { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightBlue
Gets a DrawingColor representing Light Blue (preset color).
Declaration
public static DrawingColor LightBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightCoral
Gets a DrawingColor representing Light Coral (preset color).
Declaration
public static DrawingColor LightCoral { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightCyan
Gets a DrawingColor representing Light Cyan (preset color).
Declaration
public static DrawingColor LightCyan { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightGoldenrodYellow
Gets a DrawingColor representing Light Goldenrod Yellow (preset color).
Declaration
public static DrawingColor LightGoldenrodYellow { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightGray
Gets a DrawingColor representing Light Gray (preset color).
Declaration
public static DrawingColor LightGray { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightGreen
Gets a DrawingColor representing Light Green (preset color).
Declaration
public static DrawingColor LightGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightPink
Gets a DrawingColor representing Light Pink (preset color).
Declaration
public static DrawingColor LightPink { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightSalmon
Gets a DrawingColor representing Light Salmon (preset color).
Declaration
public static DrawingColor LightSalmon { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightSeaGreen
Gets a DrawingColor representing Light Sea Green (preset color).
Declaration
public static DrawingColor LightSeaGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightSkyBlue
Gets a DrawingColor representing Light Sky Blue (preset color).
Declaration
public static DrawingColor LightSkyBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightSlateGray
Gets a DrawingColor representing Light Slate Gray (preset color).
Declaration
public static DrawingColor LightSlateGray { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightSteelBlue
Gets a DrawingColor representing Light Steel Blue (preset color).
Declaration
public static DrawingColor LightSteelBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LightYellow
Gets a DrawingColor representing Light Yellow (preset color).
Declaration
public static DrawingColor LightYellow { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Lime
Gets a DrawingColor representing Lime (preset color).
Declaration
public static DrawingColor Lime { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
LimeGreen
Gets a DrawingColor representing Lime Green (preset color).
Declaration
public static DrawingColor LimeGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Linen
Gets a DrawingColor representing Linen (preset color).
Declaration
public static DrawingColor Linen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Magenta
Gets a DrawingColor representing Magenta (preset color).
Declaration
public static DrawingColor Magenta { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Maroon
Gets a DrawingColor representing Maroon (preset color).
Declaration
public static DrawingColor Maroon { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumAquamarine
Gets a DrawingColor representing Medium Aquamarine (preset color).
Declaration
public static DrawingColor MediumAquamarine { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumBlue
Gets a DrawingColor representing Medium Blue (preset color).
Declaration
public static DrawingColor MediumBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumOrchid
Exposes the medium orchid associated with DrawingColor.
Declaration
public static DrawingColor MediumOrchid { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor | The medium orchid returned by the operation. |
MediumPurple
Gets a DrawingColor representing Medium Purple (preset color).
Declaration
public static DrawingColor MediumPurple { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumSeaGreen
Gets a DrawingColor representing Medium Sea Green (preset color).
Declaration
public static DrawingColor MediumSeaGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumSlateBlue
Gets a DrawingColor representing Medium Slate Blue (preset color).
Declaration
public static DrawingColor MediumSlateBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumSpringGreen
Gets a DrawingColor representing Medium Spring Green (preset color).
Declaration
public static DrawingColor MediumSpringGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumTurquoise
Gets a DrawingColor representing Medium Turquoise (preset color).
Declaration
public static DrawingColor MediumTurquoise { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MediumVioletRed
Gets a DrawingColor representing Medium Violet Red (preset color).
Declaration
public static DrawingColor MediumVioletRed { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Menu
Gets a DrawingColor representing the menu system color.
Declaration
public static DrawingColor Menu { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MenuBar
Gets a DrawingColor representing the menu bar system color.
Declaration
public static DrawingColor MenuBar { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MenuHighlight
Gets a DrawingColor representing the menu highlight system color.
Declaration
public static DrawingColor MenuHighlight { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MenuText
Gets a DrawingColor representing the menu text system color.
Declaration
public static DrawingColor MenuText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MidnightBlue
Gets a DrawingColor representing Midnight Blue (preset color).
Declaration
public static DrawingColor MidnightBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MintCream
Gets a DrawingColor representing Mint Cream (preset color).
Declaration
public static DrawingColor MintCream { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
MistyRose
Gets a DrawingColor representing Misty Rose (preset color).
Declaration
public static DrawingColor MistyRose { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Moccasin
Gets a DrawingColor representing Moccasin (preset color).
Declaration
public static DrawingColor Moccasin { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
NavajoWhite
Gets a DrawingColor representing Navajo White (preset color).
Declaration
public static DrawingColor NavajoWhite { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Navy
Gets a DrawingColor representing Navy (preset color).
Declaration
public static DrawingColor Navy { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
OldLace
Gets a DrawingColor representing Old Lace (preset color).
Declaration
public static DrawingColor OldLace { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Olive
Gets a DrawingColor representing Olive (preset color).
Declaration
public static DrawingColor Olive { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
OliveDrab
Gets a DrawingColor representing Olive Drab (preset color).
Declaration
public static DrawingColor OliveDrab { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Orange
Gets a DrawingColor representing Orange (preset color).
Declaration
public static DrawingColor Orange { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
OrangeRed
Gets a DrawingColor representing Orange Red (preset color).
Declaration
public static DrawingColor OrangeRed { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Orchid
Gets a DrawingColor representing Orchid (preset color).
Declaration
public static DrawingColor Orchid { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
PaleGoldenrod
Gets a DrawingColor representing Pale Goldenrod (preset color).
Declaration
public static DrawingColor PaleGoldenrod { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
PaleGreen
Gets a DrawingColor representing Pale Green (preset color).
Declaration
public static DrawingColor PaleGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
PaleTurquoise
Gets a DrawingColor representing Pale Turquoise (preset color).
Declaration
public static DrawingColor PaleTurquoise { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
PaleVioletRed
Gets a DrawingColor representing Pale Violet Red (preset color).
Declaration
public static DrawingColor PaleVioletRed { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
PapayaWhip
Gets a DrawingColor representing Papaya Whip (preset color).
Declaration
public static DrawingColor PapayaWhip { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
PeachPuff
Gets a DrawingColor representing Peach Puff (preset color).
Declaration
public static DrawingColor PeachPuff { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Peru
Gets a DrawingColor representing Peru (preset color).
Declaration
public static DrawingColor Peru { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Pink
Gets a DrawingColor representing Pink (preset color).
Declaration
public static DrawingColor Pink { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Plum
Gets a DrawingColor representing Plum (preset color).
Declaration
public static DrawingColor Plum { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
PowderBlue
Gets a DrawingColor representing Powder Blue (preset color).
Declaration
public static DrawingColor PowderBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Purple
Gets a DrawingColor representing Purple (preset color).
Declaration
public static DrawingColor Purple { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
R
Gets the red component of the color.
Declaration
public byte R { get; }
Property Value
| Type | Description |
|---|---|
| byte |
Red
Gets a DrawingColor representing Red (preset color).
Declaration
public static DrawingColor Red { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
RosyBrown
Gets a DrawingColor representing Rosy Brown (preset color).
Declaration
public static DrawingColor RosyBrown { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
RoyalBlue
Gets a DrawingColor representing Royal Blue (preset color).
Declaration
public static DrawingColor RoyalBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
S
Gets the saturation component of the color (for HSL colors).
Declaration
public double S { get; }
Property Value
| Type | Description |
|---|---|
| double |
SaddleBrown
Gets a DrawingColor representing Saddle Brown (preset color).
Declaration
public static DrawingColor SaddleBrown { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Salmon
Gets a DrawingColor representing Salmon (preset color).
Declaration
public static DrawingColor Salmon { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SandyBrown
Gets a DrawingColor representing Sandy Brown (preset color).
Declaration
public static DrawingColor SandyBrown { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
ScrollBar
Gets a DrawingColor representing the scroll bar system color.
Declaration
public static DrawingColor ScrollBar { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SeaGreen
Gets a DrawingColor representing Sea Green (preset color).
Declaration
public static DrawingColor SeaGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SeaShell
Gets a DrawingColor representing Sea Shell (preset color).
Declaration
public static DrawingColor SeaShell { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Sienna
Gets a DrawingColor representing Sienna (preset color).
Declaration
public static DrawingColor Sienna { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Silver
Gets a DrawingColor representing Silver (preset color).
Declaration
public static DrawingColor Silver { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SkyBlue
Gets a DrawingColor representing Sky Blue (preset color).
Declaration
public static DrawingColor SkyBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SlateBlue
Gets a DrawingColor representing Slate Blue (preset color).
Declaration
public static DrawingColor SlateBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SlateGray
Gets a DrawingColor representing Slate Gray (preset color).
Declaration
public static DrawingColor SlateGray { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Snow
Gets a DrawingColor representing Snow (preset color).
Declaration
public static DrawingColor Snow { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SpringGreen
Gets a DrawingColor representing Spring Green (preset color).
Declaration
public static DrawingColor SpringGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SteelBlue
Gets a DrawingColor representing Steel Blue (preset color).
Declaration
public static DrawingColor SteelBlue { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Style
Gets a DrawingColor representing the Style theme color.
Declaration
public static DrawingColor Style { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
SystemColor
Gets the system color value, if applicable.
Declaration
public SystemColorValue? SystemColor { get; }
Property Value
| Type | Description |
|---|---|
| SystemColorValue? |
Tan
Gets a DrawingColor representing Tan (preset color).
Declaration
public static DrawingColor Tan { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Teal
Gets a DrawingColor representing Teal (preset color).
Declaration
public static DrawingColor Teal { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Text1
Gets a DrawingColor representing the Text 1 theme color.
Declaration
public static DrawingColor Text1 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Text2
Gets a DrawingColor representing the Text 2 theme color.
Declaration
public static DrawingColor Text2 { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Theme
Gets the theme color for this drawing color, if applicable.
Declaration
public ThemeColor? Theme { get; }
Property Value
| Type | Description |
|---|---|
| ThemeColor? |
Thistle
Gets a DrawingColor representing Thistle (preset color).
Declaration
public static DrawingColor Thistle { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Tomato
Gets a DrawingColor representing Tomato (preset color).
Declaration
public static DrawingColor Tomato { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Transforms
Gets the collection of color transforms applied to this color.
Declaration
public List<ColorTransform> Transforms { get; }
Property Value
| Type | Description |
|---|---|
| List<ColorTransform> |
Turquoise
Gets a DrawingColor representing Turquoise (preset color).
Declaration
public static DrawingColor Turquoise { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Type
Gets the type of this drawing color (RGB, HSL, Preset, Theme, or System).
Declaration
public DrawingColorType Type { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColorType |
Violet
Gets a DrawingColor representing Violet (preset color).
Declaration
public static DrawingColor Violet { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Wheat
Gets a DrawingColor representing Wheat (preset color).
Declaration
public static DrawingColor Wheat { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
White
Gets a DrawingColor representing White (preset color).
Declaration
public static DrawingColor White { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
WhiteSmoke
Gets a DrawingColor representing White Smoke (preset color).
Declaration
public static DrawingColor WhiteSmoke { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Window
Gets a DrawingColor representing the window system color.
Declaration
public static DrawingColor Window { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
WindowFrame
Gets a DrawingColor representing the window frame system color.
Declaration
public static DrawingColor WindowFrame { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
WindowText
Gets a DrawingColor representing the window text system color.
Declaration
public static DrawingColor WindowText { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Yellow
Gets a DrawingColor representing Yellow (preset color).
Declaration
public static DrawingColor Yellow { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
YellowGreen
Gets a DrawingColor representing Yellow Green (preset color).
Declaration
public static DrawingColor YellowGreen { get; }
Property Value
| Type | Description |
|---|---|
| DrawingColor |
Methods
Equals(DrawingColor)
Determines whether the specified DrawingColor is equal to the current DrawingColor.
Declaration
protected bool Equals(DrawingColor other)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawingColor | other | The DrawingColor to compare with. |
Returns
| Type | Description |
|---|---|
| bool | True if the colors are equal; otherwise, false. |
Equals(object)
Determines whether the specified object is equal to the current DrawingColor.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with. |
Returns
| Type | Description |
|---|---|
| bool | True if the objects are equal; otherwise, false. |
Overrides
FromArgb(byte, byte, byte, byte)
Creates a DrawingColor from ARGB (Alpha, Red, Green, Blue) color components.
Declaration
public static DrawingColor FromArgb(byte a, byte r, byte g, byte b)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | a | The alpha (transparency) component (0-255). |
| byte | r | The red component (0-255). |
| byte | g | The green component (0-255). |
| byte | b | The blue component (0-255). |
Returns
| Type | Description |
|---|---|
| DrawingColor | A DrawingColor representing the specified ARGB color. |
FromColorName(string)
Creates a DrawingColor from a named color string.
Declaration
public static DrawingColor FromColorName(string colorName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | colorName | The name of the color (e.g., "black", "red", "blue"). |
Returns
| Type | Description |
|---|---|
| DrawingColor | A DrawingColor representing the named color, or null if not found. |
FromHex(string)
Creates a DrawingColor from a hexadecimal color string.
Declaration
public static DrawingColor FromHex(string hex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hex | The color in hexadecimal format (e.g., "#FF0000" for red). |
Returns
| Type | Description |
|---|---|
| DrawingColor | A DrawingColor representing the specified hex color. |
FromHsl(double, double, double)
Creates a DrawingColor from HSL (Hue, Saturation, Luminance) color components.
Declaration
public static DrawingColor FromHsl(double hue, double saturation, double luminance)
Parameters
| Type | Name | Description |
|---|---|---|
| double | hue | The hue component (0-360 degrees). |
| double | saturation | The saturation component (0-1). |
| double | luminance | The luminance component (0-1). |
Returns
| Type | Description |
|---|---|
| DrawingColor | A DrawingColor representing the specified HSL color. |
FromHslColor(Hsl)
Converts the supplied data for use with the DrawingColor.
Declaration
public static ARgb FromHslColor(Hsl hsl)
Parameters
| Type | Name | Description |
|---|---|---|
| Hsl | hsl |
Returns
| Type | Description |
|---|---|
| ARgb | The from hsl color returned by the operation. |
FromRgb(byte, byte, byte)
Creates a DrawingColor from RGB (Red, Green, Blue) color components.
Declaration
public static DrawingColor FromRgb(byte r, byte g, byte b)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | r | The red component (0-255). |
| byte | g | The green component (0-255). |
| byte | b | The blue component (0-255). |
Returns
| Type | Description |
|---|---|
| DrawingColor | A DrawingColor representing the specified RGB color. |
FromScRgb(float, float, float)
Creates a DrawingColor from ScRGB (Scale RGB) color components.
Declaration
public static DrawingColor FromScRgb(float r, float g, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| float | r | The red component (0.0-1.0). |
| float | g | The green component (0.0-1.0). |
| float | b | The blue component (0.0-1.0). |
Returns
| Type | Description |
|---|---|
| DrawingColor | A DrawingColor representing the specified ScRGB color. |
GetContrast(bool)
Returns the requested contrast.
Declaration
public DrawingColor GetContrast(bool preserveOpacity)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | preserveOpacity |
Returns
| Type | Description |
|---|---|
| DrawingColor |
Remarks
GetHashCode()
Serves as a hash function for the DrawingColor type.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current DrawingColor. |
Overrides
ToArgb()
Converts this color to an ARGB integer value.
Declaration
public int ToArgb()
Returns
| Type | Description |
|---|---|
| int | The ARGB integer value. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when the ARGB value is not set. |
ToArgb(Theme)
Converts this color to an ARGB integer value using the specified theme.
Declaration
public int ToArgb(Theme theme)
Parameters
| Type | Name | Description |
|---|---|---|
| Theme | theme | The theme to use for color resolution. |
Returns
| Type | Description |
|---|---|
| int | The ARGB integer value. |
ToColor()
Converts this color to a System.Drawing.Color.
Declaration
public Color ToColor()
Returns
| Type | Description |
|---|---|
| Color | A System.Drawing.Color representing this drawing color. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when the ARGB value is not set. |
ToHex()
Converts this color to a hexadecimal string representation.
Declaration
public string ToHex()
Returns
| Type | Description |
|---|---|
| string | A string in the format "#RRGGBB". |
ToHex(Color)
Converts a Color to a hexadecimal string representation.
Declaration
public static string ToHex(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The color to convert. |
Returns
| Type | Description |
|---|---|
| string | A string in the format "#RRGGBB". |
ToHexWithAlpha(Color)
Converts a Color to a hexadecimal string with alpha channel.
Declaration
public static string ToHexWithAlpha(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The color to convert. |
Returns
| Type | Description |
|---|---|
| string | A string in the format "#AARRGGBB". |
ToHslColor()
Converts the supplied data for use with the DrawingColor.
Declaration
public Hsl ToHslColor()
Returns
| Type | Description |
|---|---|
| Hsl | The HSL representation of the stored color. |
ToHslColor(ARgb)
Converts the supplied data for use with the DrawingColor.
Declaration
public static Hsl ToHslColor(ARgb rgb)
Parameters
| Type | Name | Description |
|---|---|---|
| ARgb | rgb | The ARGB color to convert. |
Returns
| Type | Description |
|---|---|
| Hsl | The HSL representation of |
Transform(ColorTransform)
Applies a color transform to this color.
Declaration
public DrawingColor Transform(ColorTransform transform)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorTransform | transform | The color transform to apply. |
Returns
| Type | Description |
|---|---|
| DrawingColor | This DrawingColor instance for method chaining. |