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
vector
Vector3The 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
vector
Vector3The vector representing the l a b components.
whitePoint
CieXyzThe 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
l
floatThe lightness dimension.
a
floatThe a (green - magenta) component.
b
floatThe 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
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(HunterLab)
public bool Equals(HunterLab other)
Parameters
other
HunterLab
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 ==(HunterLab, HunterLab)
Compares two HunterLab objects for equality.
public static bool operator ==(HunterLab left, HunterLab right)
Parameters
left
HunterLabThe HunterLab on the left side of the operand.
right
HunterLabThe HunterLab on the right side of the operand.
Returns
- bool
True if the current left is equal to the
right
parameter; otherwise, false.
operator !=(HunterLab, HunterLab)
Compares two HunterLab objects for inequality
public static bool operator !=(HunterLab left, HunterLab right)
Parameters
left
HunterLabThe HunterLab on the left side of the operand.
right
HunterLabThe HunterLab on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
right
parameter; otherwise, false.