ColorLAB
Represents a LAB (Lightness, A, B) color with double precision floating point channels. LAB colors are based on nonlinearly compressed CIE XYZ color space coordinates. The A and B parameters of a LAB color represent the opponents.
Namespace: Rhino.Display
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]public struct ColorLAB
The ColorLAB type exposes the following members.
Constructors
Name
Description
Public Method
ColorLAB(Color)
Constructs a new instance of ColorLAB that is equivalent to an ARGB color.
Public Method
ColorLAB(Double, Double, Double)
Constructs a new instance of ColorLAB with custom channel values.
Public Method
ColorLAB(Double, Double, Double, Double)
Constructs a new instance of ColorLAB with custom channel values.
Properties
Name
Description
Public Property
A
Gets or sets the Base channel. The channel is limited to -1~+1.
Public Property
Alpha
Gets or sets the Alpha channel. The channel is limited to 0~1.
Public Property
B
Gets or sets the Opponent channel. The channel is limited to -1~+1.
Public Property
L
Gets or sets the lightness channel. The channel is limited to 0~1.
Methods
Name
Description
Public Method
Static Member
CreateFromCMYK
Create the nearest LAB equivalent of a CMYK color.
Public Method
Static Member
CreateFromHSL
Create the nearest LAB equivalent of an HSL color.
Public Method
Static Member
CreateFromHSV
Constructs the nearest LAB equivalent of an HSV color.
Public Method
Static Member
CreateFromLCH
Create the nearest LAB equivalent of an LCH color.
Public Method
Static Member
CreateFromRGBA
Create the nearest LAB equivalent of an RGBA color.
Public Method
Static Member
CreateFromXYZ
Create the nearest LAB 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
ToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Operators
Name
Description
Public Operator
Static Member
.(ColorLAB to Color)
Implicitly converts a LAB color into a .Net library color.