Struct CieLab
Represents a CIE Lab* 1976 color. https://en.wikipedia.org/wiki/Lab_color_space
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct CieLab : IEquatable<CieLab>
Constructors
| Edit this page View SourceCieLab(Vector3)
Initializes a new instance of the CieLab struct.
Declaration
public CieLab(Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the l, a, b components. |
Remarks
Uses DefaultWhitePoint as white point.
CieLab(Vector3, CieXyz)
Initializes a new instance of the CieLab struct.
Declaration
public CieLab(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 |
CieLab(float, float, float)
Initializes a new instance of the CieLab struct.
Declaration
public CieLab(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.
CieLab(float, float, float, CieXyz)
Initializes a new instance of the CieLab struct.
Declaration
public CieLab(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(CieLab)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CieLab other)
Parameters
Type | Name | Description |
---|---|---|
CieLab | 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 ==(CieLab, CieLab)
Compares two CieLab objects for equality.
Declaration
public static bool operator ==(CieLab left, CieLab right)
Parameters
Type | Name | Description |
---|---|---|
CieLab | left | The CieLab on the left side of the operand. |
CieLab | right | The CieLab on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is equal to the |
operator !=(CieLab, CieLab)
Compares two CieLab objects for inequality
Declaration
public static bool operator !=(CieLab left, CieLab right)
Parameters
Type | Name | Description |
---|---|---|
CieLab | left | The CieLab on the left side of the operand. |
CieLab | right | The CieLab on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is unequal to the |