Struct HunterLab
Represents an Hunter LAB color. https://en.wikipedia.org/wiki/Lab_color_space.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct HunterLab : IEquatable<HunterLab>
Constructors
| Edit this page View SourceHunterLab(Vector3)
Initializes a new instance of the HunterLab struct.
Declaration
public HunterLab(Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the l, a, b components. |
Remarks
Uses DefaultWhitePoint as white point.
HunterLab(Vector3, CieXyz)
Initializes a new instance of the HunterLab struct.
Declaration
public HunterLab(Vector3 vector, CieXyz whitePoint)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the l a b components. |
CieXyz | whitePoint | The reference white point. Illuminants |
HunterLab(float, float, float)
Initializes a new instance of the HunterLab struct.
Declaration
public HunterLab(float l, float a, float b)
Parameters
Type | Name | Description |
---|---|---|
float | l | The lightness dimension. |
float | a | The a (green - magenta) component. |
float | b | The b (blue - yellow) component. |
Remarks
Uses DefaultWhitePoint as white point.
HunterLab(float, float, float, CieXyz)
Initializes a new instance of the HunterLab struct.
Declaration
public HunterLab(float l, float a, float b, CieXyz whitePoint)
Parameters
Type | Name | Description |
---|---|---|
float | l | The lightness dimension. |
float | a | The a (green - magenta) component. |
float | b | The b (blue - yellow) component. |
CieXyz | whitePoint | The reference white point. Illuminants |
Fields
| Edit this page View SourceDefaultWhitePoint
D50 standard illuminant. Used when reference white is not specified explicitly.
Declaration
public static readonly CieXyz DefaultWhitePoint
Field Value
Type | Description |
---|---|
CieXyz |
Properties
| Edit this page View SourceA
Gets the a color component.
Declaration
public float A { get; }
Property Value
Type | Description |
---|---|
float |
B
Gets the b color component.
Declaration
public float B { get; }
Property Value
Type | Description |
---|---|
float |
L
Gets the lightness dimension.
Declaration
public float L { get; }
Property Value
Type | Description |
---|---|
float |
WhitePoint
Gets the reference white point of this color.
Declaration
public CieXyz WhitePoint { get; }
Property Value
Type | Description |
---|---|
CieXyz |
Methods
| Edit this page View SourceEquals(HunterLab)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(HunterLab other)
Parameters
Type | Name | Description |
---|---|---|
HunterLab | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
| Edit this page View Sourceoperator ==(HunterLab, HunterLab)
Compares two HunterLab objects for equality.
Declaration
public static bool operator ==(HunterLab left, HunterLab right)
Parameters
Type | Name | Description |
---|---|---|
HunterLab | left | The HunterLab on the left side of the operand. |
HunterLab | right | The HunterLab on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is equal to the |
operator !=(HunterLab, HunterLab)
Compares two HunterLab objects for inequality
Declaration
public static bool operator !=(HunterLab left, HunterLab right)
Parameters
Type | Name | Description |
---|---|---|
HunterLab | left | The HunterLab on the left side of the operand. |
HunterLab | right | The HunterLab on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is unequal to the |