Back to DOM
SaturationClass
Definition
- Namespace
- DOM.Elements.Graphics.Colors
- Assembly
- DOM.dll
Represents a saturation modifier applied to a color.
Remarks
adjusts the intensity of a color by a percentage. It derives from and supports an implicit conversion from (percentage). Saturation BaseColorField Double
Examples
csharp
1// 1. Explicit saturation modifier
2var s = new Saturation { Value = new Percentage(-20) };
3
csharp
1// 2. Implicit conversion from double
2Saturation s = 30;
3
csharp
1// 3. Attach to a color
2var color = new Color("#3498db") { Saturation = new Saturation { Value = new Percentage(50) } };
3
csharp
1// 4. Combine with hue rotation
2var color = new Color("#3498db")
3{
4 Hue = new Hue { Angle = 45 },
5 Saturation = new Saturation { Value = new Percentage(20) }
6};
7
Properties
ValuePercentage
Gets or sets the saturation modifier value.
Methods
Implicitly converts a to a . Double, Saturation