UI_HSBCOLOR - harborsiem/WinForms-Ribbon GitHub Wiki

UI_HSBCOLOR

It is a helper struct for Hue, Saturation, Brightness (HSB) colors in the Ribbon. The conversion from / to Color or COLORREF (_COLORREF) is not lossless.

Public constructors, methods, properties and events:

Constructors:

Name Description
UI_HSBCOLOR() Initializes a new instance of the UI_HSBCOLOR struct.
UI_HSBCOLOR(uint) Initializes a new instance of the UI_HSBCOLOR struct by a HSB value.
UI_HSBCOLOR(byte, byte, byte) Initializes a new instance of the UI_HSBCOLOR struct by HSB parts.
UI_HSBCOLOR(_COLORREF) Initializes a new instance of the UI_HSBCOLOR struct by a COLORREF.
UI_HSBCOLOR(Color) Initializes a new instance of the UI_HSBCOLOR struct by a Color.

Methods:

Name Description
ToColor() Get the Color.
ToColorRef() Get the COLOREF (_COLORREF).

Properties:

Name Description
Hue (byte) Get the Hue part of the color. Range 0 .. 255
Saturation (byte) Get the Saturation part of the color. Range 0 .. 255
Brightness (byte) Get the Brightness part of the color. Range 0 .. 255

Events: