Click or drag to resize

ColorHSL Structure

Represents an HSL (Hue, Saturation, Luminance) color with double precision floating point channels. HSL colors are used primarily in Graphical User Interface environments as they provide a very natural approach to picking colors.

Namespace:  Rhino.Display
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]
public struct ColorHSL

The ColorHSL type exposes the following members.

Constructors
  NameDescription
Public methodColorHSL(Color)
Constructs a new instance of ColorHSL that is equivalent to an RGB color.
Public methodColorHSL(Double, Double, Double)
Constructs a new instance of ColorHSL with custom channel values.
Public methodColorHSL(Double, Double, Double, Double)
Constructs a new instance of ColorHSL with custom channel values.
Top
Properties
  NameDescription
Public propertyA
Gets or sets the alpha channel value. Alpha channels are limited to a 0~1 range.
Public propertyH
Gets or sets the hue channel value. Hue channels rotate between 0.0 and 1.0.
Public propertyL
Gets or sets the luminance channel value. Luminance channels are limited to a 0~1 range.
Public propertyS
Gets or sets the saturation channel value. Saturation channels are limited to a 0~1 range.
Top
Methods
  NameDescription
Public methodStatic memberCreateFromCMYK
Create the nearest HSL equivalent of a CMYK color.
Public methodStatic memberCreateFromHSV
Constructs the nearest HSL equivalent of an HSV color.
Public methodStatic memberCreateFromLAB
Create the nearest HSL equivalent of a LAB color.
Public methodStatic memberCreateFromLCH
Create the nearest HSL equivalent of a LCH color.
Public methodStatic memberCreateFromXYZ
Create the nearest HSL equivalent of an XYZ color.
Public methodEquals (Inherited from ValueType.)
Public methodGetHashCode (Inherited from ValueType.)
Public methodGetType (Inherited from Object.)
Public methodToArgbColor
Convert HSL color to an equivalent System.Drawing.Color.
Public methodToString (Inherited from ValueType.)
Top
Operators
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.6
See Also