xtd 0.2.0
Loading...
Searching...
No Matches

◆ get_saturation()

float xtd::drawing::color::get_saturation ( ) const
noexcept

Gets the hue-saturation-brightness (HSB) saturation value for this xtd::drawing::color structure.

Returns
The saturation of this xtd::drawing::color. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.
Examples
The following code example is designed for use with Windows Forms, and it requires xtd::forms::paint_event_args, which is a parameter of the xtd::forms::control::paint event handler. The code performs the following actions: