ColorClass
Definition
- Namespace
- DOM.Elements.Graphics.Colors
- Assembly
- DOM.dll
Represents a color used across the document model.
Remarks
is the universal color type used by text, borders, fills, effects, and every other part of the DOM that needs a color. It supports several color models (RGB / hex, Theme, Scheme, Preset, System), transformations (tint, shade, hue, saturation, luminance, gamma, complement, inverse), and a large library of predefined colors exposed as static readonly fields (,,,, etc.). Color Red Black Accent1 WindowText A color can be constructed from a hex string (with or without leading, and with 3, 6, or 8 digits), from an RGB or ARGB numeric tuple, or from one of the predefined static instances. The color model is automatically detected when parsing from a string. # For theme colors, use the static factory which allows supplying an optional hex override and an optional tint. ThemeColor(ThemeColorValues, string, Percentage)
Examples
Constructors
Initializes an empty instance. All channels are unset; assign them explicitly or use one of the other constructors. Color
Initializes a new from a string representation. Color
Initializes a new from ARGB components. Color
Initializes a new opaque from RGB components (alpha is set to 255). Color
Properties
Gets or sets the alpha (transparency) channel of the color.
Gets or sets the blue channel of the color.
Gets or sets the color model used by this instance.
Gets a string representation of the color value.
Gets or sets whether the complement (opposite on the color wheel) should be used.
Gets or sets the green channel of the color.
Gets or sets whether gamma correction should be applied.
Gets or sets the hue rotation applied to the color.
Gets or sets whether the color should be inverted.
Gets or sets whether inverse gamma correction should be applied.
Gets or sets the luminance modifier applied to the color.
Gets or sets the red channel of the color.
Gets or sets the saturation modifier applied to the color.
Gets or sets the shade (darkening) percentage applied to the color.
Gets or sets the theme color value.
Assigning a value sets to . ColorType ThemeColor
Gets or sets the tint (lightening) percentage applied to the color.
Methods
Parses a string representation of the color and updates this instance accordingly.
Creates a theme color with an optional hex override and tint.
Returns the string representation of the color (hex value or predefined name).
Fields
Represents the accent1 color.
Represents the accent2 color.
Represents the accent3 color.
Represents the accent4 color.
Represents the accent5 color.
Represents the accent6 color.
Represents the Active Border color.
Represents the Active Caption color.
Represents the background2 color.
Represents the TextColor color.
Gets a system-defined color that has an ARGB value of #F0F8FF.
Gets a system-defined color that has an ARGB value of #FAEBD7.
Represents the Application Workspace color.
Gets a system-defined color that has an ARGB value of #00FFFF.
Gets a system-defined color that has an ARGB value of #7FFFD4.
Represents the hyperlink color.
The value.
Gets a system-defined color that has an ARGB value of #F0FFFF.
Represents the Background color.
Represents the background1 color.
Represents the background2 color.
Represents the background2 color.
Gets a system-defined color that has an ARGB value of #F5F5DC.
Gets a system-defined color that has an ARGB value of #FFE4C4.
Gets a system-defined color that has an ARGB value of #000000.
Gets a system-defined color that has an ARGB value of #FFEBCD.
Gets a system-defined color that has an ARGB value of #0000FF.
Gets a system-defined color that has an ARGB value of #8A2BE2.
Gets a system-defined color that has an ARGB value of #A52A2A.
Gets a system-defined color that has an ARGB value of #DEB887.
Represents the Button Face color.
Represents the Button Highlight color.
Represents the Button Shadow color.
Represents the Button Text color.
Gets a system-defined color that has an ARGB value of #5F9EA0.
Represents the Caption Text color.
Gets a system-defined color that has an ARGB value of #7FFF00.
Gets a system-defined color that has an ARGB value of #D2691E.
Gets a system-defined color that has an ARGB value of #FF7F50.
Gets a system-defined color that has an ARGB value of #6495ED.
Gets a system-defined color that has an ARGB value of #FFF8DC.
Gets a system-defined color that has an ARGB value of #DC143C.
Gets a system-defined color that has an ARGB value of #00FFFF.
Represents the dark1 color.
Represents the dark2 color.
Gets a system-defined color that has an ARGB value of #00008B.
Gets a system-defined color that has an ARGB value of #008B8B.
Gets a system-defined color that has an ARGB value of #B8860B.
Gets a system-defined color that has an ARGB value of #A9A9A9.
Gets a system-defined color that has an ARGB value of #006400.
Gets a system-defined color that has an ARGB value of #BDB76B.
Gets a system-defined color that has an ARGB value of #8B008B.
Gets a system-defined color that has an ARGB value of #556B2F.
Gets a system-defined color that has an ARGB value of #FF8C00.
Gets a system-defined color that has an ARGB value of #9932CC.
Gets a system-defined color that has an ARGB value of #8B0000.
Gets a system-defined color that has an ARGB value of #E9967A.
Gets a system-defined color that has an ARGB value of #8FBC8B.
Gets a system-defined color that has an ARGB value of #483D8B.
Gets a system-defined color that has an ARGB value of #2F4F4F.
Gets a system-defined color that has an ARGB value of #00CED1.
Gets a system-defined color that has an ARGB value of #9400D3.
Gets a system-defined color that has an ARGB value of #FF1493.
Gets a system-defined color that has an ARGB value of #00BFFF.
Gets a system-defined color that has an ARGB value of #696969.
Gets a system-defined color that has an ARGB value of #1E90FF.
The value.
Represents the hyperlink color.
Represents the hyperlink color.
Represents the hyperlink color.
Represents the hyperlink color.
Represents the hyperlink color.
Represents the hyperlink color.
Gets a system-defined color that has an ARGB value of #B22222.
Gets a system-defined color that has an ARGB value of #FFFAF0.
Represents the followed hyperlink color.
Gets a system-defined color that has an ARGB value of #228B22.
Gets a system-defined color that has an ARGB value of #FF00FF.
Gets a system-defined color that has an ARGB value of #DCDCDC.
Gets a system-defined color that has an ARGB value of #F8F8FF.
Gets a system-defined color that has an ARGB value of #FFD700.
Gets a system-defined color that has an ARGB value of #DAA520.
Represents the Gradient Active Caption color.
Represents the Gradient Inactive Caption color.
Gets a system-defined color that has an ARGB value of #808080.
Represents the Gray Text color.
Gets a system-defined color that has an ARGB value of #008000.
Gets a system-defined color that has an ARGB value of #ADFF2F.
Represents the Highlight color.
Represents the Highlight Text color.
Gets a system-defined color that has an ARGB value of #F0FFF0.
Represents the Hot Light color.
Gets a system-defined color that has an ARGB value of #FF69B4.
Represents the hyperlink color.
Represents the hyperlink color.
Represents the Inactive Border color.
Represents the Inactive Caption color.
Represents the Inactive Caption Text color.
Gets a system-defined color that has an ARGB value of #CD5C5C.
Gets a system-defined color that has an ARGB value of #4B0082.
Represents the Info Back color.
Represents the Info Text color.
Gets a system-defined color that has an ARGB value of #FFFFF0.
Gets a system-defined color that has an ARGB value of #F0E68C.
Gets a system-defined color that has an ARGB value of #E6E6FA.
Gets a system-defined color that has an ARGB value of #FFF0F5.
Gets a system-defined color that has an ARGB value of #7CFC00.
Gets a system-defined color that has an ARGB value of #FFFACD.
Represents the light1 color.
Represents the light2 color.
Gets a system-defined color that has an ARGB value of #ADD8E6.
Gets a system-defined color that has an ARGB value of #F08080.
Gets a system-defined color that has an ARGB value of #E0FFFF.
Gets a system-defined color that has an ARGB value of #FAFAD2.
Gets a system-defined color that has an ARGB value of #D3D3D3.
Gets a system-defined color that has an ARGB value of #90EE90.
Gets a system-defined color that has an ARGB value of #FFB6C1.
Gets a system-defined color that has an ARGB value of #FFA07A.
Gets a system-defined color that has an ARGB value of #20B2AA.
Gets a system-defined color that has an ARGB value of #87CEFA.
Gets a system-defined color that has an ARGB value of #778899.
Gets a system-defined color that has an ARGB value of #B0C4DE.
Gets a system-defined color that has an ARGB value of #FFFFE0.
Gets a system-defined color that has an ARGB value of #00FF00.
Gets a system-defined color that has an ARGB value of #32CD32.
Gets a system-defined color that has an ARGB value of #FAF0E6.
Gets a system-defined color that has an ARGB value of #FF00FF.
Represents the hyperlink color.
Represents the hyperlink color.
Represents the hyperlink color.
Represents the hyperlink color.
Gets a system-defined color that has an ARGB value of #800000.
Gets a system-defined color that has an ARGB value of #66CDAA.
Gets a system-defined color that has an ARGB value of #0000CD.
Gets a system-defined color that has an ARGB value of #BA55D3.
Gets a system-defined color that has an ARGB value of #9370DB.
Gets a system-defined color that has an ARGB value of #3CB371.
Gets a system-defined color that has an ARGB value of #7B68EE.
Gets a system-defined color that has an ARGB value of #00FA9A.
Gets a system-defined color that has an ARGB value of #48D1CC.
Gets a system-defined color that has an ARGB value of #C71585.
Represents the Menu color.
Represents the Menu Bar color.
Represents the Menu Highlight color.
Represents the Menu Text color.
Gets a system-defined color that has an ARGB value of #191970.
Gets a system-defined color that has an ARGB value of #F5FFFA.
Gets a system-defined color that has an ARGB value of #FFE4E1.
Gets a system-defined color that has an ARGB value of #FFE4B5.
Gets a system-defined color that has an ARGB value of #FFDEAD.
Gets a system-defined color that has an ARGB value of #000080.
Represents none as the color.
Gets a system-defined color that has an ARGB value of #FDF5E6.
Gets a system-defined color that has an ARGB value of #808000.
Gets a system-defined color that has an ARGB value of #6B8E23.
Gets a system-defined color that has an ARGB value of #FFA500.
Gets a system-defined color that has an ARGB value of #FF4500.
Gets a system-defined color that has an ARGB value of #DA70D6.
Gets a system-defined color that has an ARGB value of #EEE8AA.
Gets a system-defined color that has an ARGB value of #98FB98.
Gets a system-defined color that has an ARGB value of #AFEEEE.
Gets a system-defined color that has an ARGB value of #DB7093.
Gets a system-defined color that has an ARGB value of #FFEFD5.
Gets a system-defined color that has an ARGB value of #FFDAB9.
Gets a system-defined color that has an ARGB value of #CD853F.
Gets a system-defined color that has an ARGB value of #FFC0CB.
Gets a system-defined color that has an ARGB value of #DDA0DD.
Gets a system-defined color that has an ARGB value of #B0E0E6.
Gets a system-defined color that has an ARGB value of #800080.
Gets a system-defined color that has an ARGB value of #663399.
Gets a system-defined color that has an ARGB value of #FF0000.
Gets a system-defined color that has an ARGB value of #BC8F8F.
Gets a system-defined color that has an ARGB value of #4169E1.
Gets a system-defined color that has an ARGB value of #8B4513.
Gets a system-defined color that has an ARGB value of #FA8072.
Gets a system-defined color that has an ARGB value of #F4A460.
Represents the Scroll Bar color.
Gets a system-defined color that has an ARGB value of #2E8B57.
Gets a system-defined color that has an ARGB value of #FFF5EE.
Gets a system-defined color that has an ARGB value of #A0522D.
Gets a system-defined color that has an ARGB value of #C0C0C0.
Gets a system-defined color that has an ARGB value of #87CEEB.
Gets a system-defined color that has an ARGB value of #6A5ACD.
Gets a system-defined color that has an ARGB value of #708090.
Gets a system-defined color that has an ARGB value of #FFFAFA.
Gets a system-defined color that has an ARGB value of #00FF7F.
Gets a system-defined color that has an ARGB value of #4682B4.
Gets a system-defined color that has an ARGB value of #D2B48C.
Gets a system-defined color that has an ARGB value of #008080.
Represents the text1 color.
Represents the text2 color.
Represents the TextColor color.
Gets a system-defined color that has an ARGB value of #D2B48C.
Represents the 3D Dark color.
Represents the 3D Light color.
Gets a system-defined color that has an ARGB value of #FF6347.
Gets a system-defined color that has an ARGB value of #00FFFFFF.
Gets a system-defined color that has an ARGB value of #40E0D0.
Gets a system-defined color that has an ARGB value of #EE82EE.
Gets a system-defined color that has an ARGB value of #F5DEB3.
Gets a system-defined color that has an ARGB value of #FFFFFF.
Gets a system-defined color that has an ARGB value of #F5F5F5.
Represents the Window color.
Represents the Window Frame color.
Represents the Window Text color.
Gets a system-defined color that has an ARGB value of #FFFF00.
Gets a system-defined color that has an ARGB value of #9ACD32.