Back to DOM
ColorTypeValuesEnum
Definition
- Namespace
- DOM.Enums
- Assembly
- DOM.dll
Specifies the source or model of a color.
Remarks
Used by to indicate which color model the instance represents. This determines how the color is serialized and how it resolves at render time. Color.ColorType
Examples
csharp
1// 1. Standard RGB color
2var c = new Color("#FF5733");
3Console.WriteLine(c.ColorType); // RgbColorModelHex
4
csharp
1// 2. Theme color
2var c = Color.ThemeColor(ThemeColorValues.Accent1);
3Console.WriteLine(c.ColorType); // ThemeColor
4
csharp
1// 3. Preset color
2var c = new Color("Red");
3Console.WriteLine(c.ColorType); // PresetColor
4
csharp
1// 4. System color
2var c = new Color("WindowText");
3Console.WriteLine(c.ColorType); // SystemColor
4
Fields
HueSaturationLuminance
Hue, Saturation, Luminance color model.
PresetColor
Predefined preset color.
RgbColorModelHex
RGB color expressed as a hex string (RRGGBB).
SchemeColor
Scheme-based color.
Standard
Standard color slot (no explicit model).
SystemColor
Color bound to a predefined operating-system element.
ThemeColor
Theme-based color.