Struct CieLch
Represents the CIE LCh°, cylindrical form of the CIE Lab* 1976 color. https://en.wikipedia.org/wiki/Lab_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct CieLch : IEquatable<CieLch>
Constructors
| Improve this Doc View SourceCieLch(Vector3)
Initializes a new instance of the CieLch struct.
Declaration
public CieLch(Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the l, c, h components. |
Remarks
Uses DefaultWhitePoint as white point.
CieLch(Vector3, CieXyz)
Initializes a new instance of the CieLch struct.
Declaration
public CieLch(Vector3 vector, CieXyz whitePoint)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the l, c, h components. |
CieXyz | whitePoint | The reference white point. Illuminants |
CieLch(Single, Single, Single)
Initializes a new instance of the CieLch struct.
Declaration
public CieLch(float l, float c, float h)
Parameters
Type | Name | Description |
---|---|---|
Single | l | The lightness dimension. |
Single | c | The chroma, relative saturation. |
Single | h | The hue in degrees. |
Remarks
Uses DefaultWhitePoint as white point.
CieLch(Single, Single, Single, CieXyz)
Initializes a new instance of the CieLch struct.
Declaration
public CieLch(float l, float c, float h, CieXyz whitePoint)
Parameters
Type | Name | Description |
---|---|---|
Single | l | The lightness dimension. |
Single | c | The chroma, relative saturation. |
Single | h | The hue in degrees. |
CieXyz | whitePoint | The reference white point. Illuminants |
Fields
| Improve this Doc View SourceC
Gets the a chroma component.
Declaration
public readonly float C
Field Value
Type | Description |
---|---|
Single |
DefaultWhitePoint
D50 standard illuminant. Used when reference white is not specified explicitly.
Declaration
public static readonly CieXyz DefaultWhitePoint
Field Value
Type | Description |
---|---|
CieXyz |
H
Gets the h° hue component in degrees.
Declaration
public readonly float H
Field Value
Type | Description |
---|---|
Single |
L
Gets the lightness dimension.
Declaration
public readonly float L
Field Value
Type | Description |
---|---|
Single |
WhitePoint
Gets the reference white point of this color
Declaration
public readonly CieXyz WhitePoint
Field Value
Type | Description |
---|---|
CieXyz |
Methods
| Improve this Doc View SourceEquals(CieLch)
Declaration
public readonly bool Equals(CieLch other)
Parameters
Type | Name | Description |
---|---|---|
CieLch | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceSaturation()
Computes the saturation of the color (chroma normalized by lightness)
Declaration
public readonly float Saturation()
Returns
Type | Description |
---|---|
Single | The Single |
Remarks
A value ranging from 0 to 100.
ToString()
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
| Improve this Doc View SourceEquality(CieLch, CieLch)
Compares two CieLch objects for equality.
Declaration
public static bool operator ==(CieLch left, CieLch right)
Parameters
Type | Name | Description |
---|---|---|
CieLch | left | The CieLch on the left side of the operand. |
CieLch | right | The CieLch on the right side of the operand. |
Returns
Type | Description |
---|---|
Boolean | True if the current left is equal to the |
Inequality(CieLch, CieLch)
Compares two CieLch objects for inequality
Declaration
public static bool operator !=(CieLch left, CieLch right)
Parameters
Type | Name | Description |
---|---|---|
CieLch | left | The CieLch on the left side of the operand. |
CieLch | right | The CieLch on the right side of the operand. |
Returns
Type | Description |
---|---|
Boolean | True if the current left is unequal to the |