ColorHSL
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
Name
Description
Public Method
ColorHSL(Color)
Constructs a new instance of ColorHSL that is equivalent to an ARGB color.
Public Method
ColorHSL(Double, Double, Double)
Constructs a new instance of ColorHSL with custom channel values.
Public Method
ColorHSL(Double, Double, Double, Double)
Constructs a new instance of ColorHSL with custom channel values.
Properties
Name
Description
Public Property
A
Gets or sets the alpha channel value. Alpha channels are limited to a 0~1 range.
Public Property
H
Gets or sets the hue channel value. Hue channels rotate between 0.0 and 1.0.
Public Property
L
Gets or sets the luminance channel value. Luminance channels are limited to a 0~1 range.
Public Property
S
Gets or sets the saturation channel value. Saturation channels are limited to a 0~1 range.
Methods
Name
Description
Public Method
Static Member
CreateFromCMYK
Create the nearest HSL equivalent of a CMYK color.
Public Method
Static Member
CreateFromHSV
Constructs the nearest HSL equivalent of an HSV color.
Public Method
Static Member
CreateFromLAB
Create the nearest HSL equivalent of a LAB color.
Public Method
Static Member
CreateFromLCH
Create the nearest HSL equivalent of a LCH color.
Public Method
Static Member
CreateFromRGBA
Create the nearest HSL equivalent of a RGBA color.
Public Method
Static Member
CreateFromXYZ
Create the nearest HSL equivalent of an XYZ color.
Public Method
Equals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public Method
GetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
ToArgbColor
Convert HSL color to an equivalent System.Drawing.Color.
Public Method
ToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Operators
Name
Description
Public Operator
Static Member
.(ColorHSL to Color)
Implicitly converts a ColorHSL in a .Net library color.