Struct CieLab
- Namespace
- SixLabors.ImageSharp.ColorSpaces
- Assembly
- SixLabors.ImageSharp.dll
Represents a CIE Lab* 1976 color. https://en.wikipedia.org/wiki/Lab_color_space
public readonly struct CieLab : IEquatable<CieLab>
- Implements
- Inherited Members
Constructors
CieLab(Vector3)
Initializes a new instance of the CieLab struct.
public CieLab(Vector3 vector)
Parameters
vector
Vector3The vector representing the l, a, b components.
Remarks
Uses DefaultWhitePoint as white point.
CieLab(Vector3, CieXyz)
Initializes a new instance of the CieLab struct.
public CieLab(Vector3 vector, CieXyz whitePoint)
Parameters
vector
Vector3The vector representing the l, a, b components.
whitePoint
CieXyzThe reference white point. Illuminants
CieLab(float, float, float)
Initializes a new instance of the CieLab struct.
public CieLab(float l, float a, float b)
Parameters
l
floatThe lightness dimension.
a
floatThe a (green - magenta) component.
b
floatThe b (blue - yellow) component.
Remarks
Uses DefaultWhitePoint as white point.
CieLab(float, float, float, CieXyz)
Initializes a new instance of the CieLab struct.
public CieLab(float l, float a, float b, CieXyz whitePoint)
Parameters
l
floatThe lightness dimension.
a
floatThe a (green - magenta) component.
b
floatThe b (blue - yellow) component.
whitePoint
CieXyzThe reference white point. Illuminants
Fields
DefaultWhitePoint
D50 standard illuminant. Used when reference white is not specified explicitly.
public static readonly CieXyz DefaultWhitePoint
Field Value
Properties
A
Gets the a color component.
public float A { get; }
Property Value
B
Gets the b color component.
public float B { get; }
Property Value
L
Gets the lightness dimension.
public float L { get; }
Property Value
WhitePoint
Gets the reference white point of this color
public CieXyz WhitePoint { get; }
Property Value
Methods
Equals(CieLab)
public bool Equals(CieLab other)
Parameters
other
CieLab
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(CieLab, CieLab)
Compares two CieLab objects for equality.
public static bool operator ==(CieLab left, CieLab right)
Parameters
left
CieLabThe CieLab on the left side of the operand.
right
CieLabThe CieLab on the right side of the operand.
Returns
- bool
True if the current left is equal to the
right
parameter; otherwise, false.
operator !=(CieLab, CieLab)
Compares two CieLab objects for inequality
public static bool operator !=(CieLab left, CieLab right)
Parameters
left
CieLabThe CieLab on the left side of the operand.
right
CieLabThe CieLab on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
right
parameter; otherwise, false.