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
| Edit this page 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(float, float, float)
Initializes a new instance of the CieLch struct.
Declaration
public CieLch(float l, float c, float h)
Parameters
Type | Name | Description |
---|---|---|
float | l | The lightness dimension. |
float | c | The chroma, relative saturation. |
float | h | The hue in degrees. |
Remarks
Uses DefaultWhitePoint as white point.
CieLch(float, float, float, CieXyz)
Initializes a new instance of the CieLch struct.
Declaration
public CieLch(float l, float c, float h, CieXyz whitePoint)
Parameters
Type | Name | Description |
---|---|---|
float | l | The lightness dimension. |
float | c | The chroma, relative saturation. |
float | h | The hue in degrees. |
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 SourceC
Gets the a chroma component.
Declaration
public float C { get; }
Property Value
Type | Description |
---|---|
float |
H
Gets the h° hue component in degrees.
Declaration
public float H { 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(CieLch)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CieLch other)
Parameters
Type | Name | Description |
---|---|---|
CieLch | 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 SourceSaturation()
Computes the saturation of the color (chroma normalized by lightness)
Declaration
public float Saturation()
Returns
Type | Description |
---|---|
float | The float |
Remarks
A value ranging from 0 to 100.
ToString()
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 ==(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 |
---|---|
bool | True if the current left is equal to the |
operator !=(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 |
---|---|
bool | True if the current left is unequal to the |