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