Struct HunterLab
- Namespace
- SixLabors.ImageSharp.ColorSpaces
- Assembly
- SixLabors.ImageSharp.dll
Represents an Hunter LAB color. https://en.wikipedia.org/wiki/Lab_color_space.
public readonly struct HunterLab : IEquatable<HunterLab>
- Implements
- Inherited Members
Constructors
HunterLab(Vector3)
Initializes a new instance of the HunterLab struct.
public HunterLab(Vector3 vector)
Parameters
vectorVector3The vector representing the l, a, b components.
Remarks
Uses DefaultWhitePoint as white point.
HunterLab(Vector3, CieXyz)
Initializes a new instance of the HunterLab struct.
public HunterLab(Vector3 vector, CieXyz whitePoint)
Parameters
vectorVector3The vector representing the l a b components.
whitePointCieXyzThe reference white point. Illuminants
HunterLab(float, float, float)
Initializes a new instance of the HunterLab struct.
public HunterLab(float l, float a, float b)
Parameters
lfloatThe lightness dimension.
afloatThe a (green - magenta) component.
bfloatThe b (blue - yellow) component.
Remarks
Uses DefaultWhitePoint as white point.
HunterLab(float, float, float, CieXyz)
Initializes a new instance of the HunterLab struct.
public HunterLab(float l, float a, float b, CieXyz whitePoint)
Parameters
lfloatThe lightness dimension.
afloatThe a (green - magenta) component.
bfloatThe b (blue - yellow) component.
whitePointCieXyzThe 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(HunterLab)
public bool Equals(HunterLab other)
Parameters
otherHunterLab
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(HunterLab, HunterLab)
Compares two HunterLab objects for equality.
public static bool operator ==(HunterLab left, HunterLab right)
Parameters
leftHunterLabThe HunterLab on the left side of the operand.
rightHunterLabThe HunterLab on the right side of the operand.
Returns
- bool
True if the current left is equal to the
rightparameter; otherwise, false.
operator !=(HunterLab, HunterLab)
Compares two HunterLab objects for inequality
public static bool operator !=(HunterLab left, HunterLab right)
Parameters
leftHunterLabThe HunterLab on the left side of the operand.
rightHunterLabThe HunterLab on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
rightparameter; otherwise, false.