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

◆ get_brightness()

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

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

Returns
The brightness of this xtd::drawing::color. The lightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.
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: