Struct CieLchuv
- Namespace
- SixLabors.ImageSharp.ColorSpaces
- Assembly
- SixLabors.ImageSharp.dll
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
public readonly struct CieLchuv : IEquatable<CieLchuv>
- Implements
- Inherited Members
Constructors
CieLchuv(Vector3)
Initializes a new instance of the CieLchuv struct.
public CieLchuv(Vector3 vector)
Parameters
vector
Vector3The vector representing the l, c, h components.
Remarks
Uses DefaultWhitePoint as white point.
CieLchuv(Vector3, CieXyz)
Initializes a new instance of the CieLchuv struct.
public CieLchuv(Vector3 vector, CieXyz whitePoint)
Parameters
vector
Vector3The vector representing the l, c, h components.
whitePoint
CieXyzThe reference white point. Illuminants
CieLchuv(float, float, float)
Initializes a new instance of the CieLchuv struct.
public CieLchuv(float l, float c, float h)
Parameters
l
floatThe lightness dimension.
c
floatThe chroma, relative saturation.
h
floatThe hue in degrees.
Remarks
Uses DefaultWhitePoint as white point.
CieLchuv(float, float, float, CieXyz)
Initializes a new instance of the CieLchuv struct.
public CieLchuv(float l, float c, float h, CieXyz whitePoint)
Parameters
l
floatThe lightness dimension.
c
floatThe chroma, relative saturation.
h
floatThe hue in degrees.
whitePoint
CieXyzThe reference white point. Illuminants
Fields
DefaultWhitePoint
D50 standard illuminant. Used when reference white is not specified explicitly.
public static readonly CieXyz DefaultWhitePoint
Field Value
Properties
C
Gets the a chroma component.
public float C { get; }
Property Value
H
Gets the h° hue component in degrees.
public float H { get; }
Property Value
L
Gets the lightness dimension.
public float L { get; }
Property Value
WhitePoint
Gets the reference white point of this color
public CieXyz WhitePoint { get; }
Property Value
Methods
Equals(CieLchuv)
public bool Equals(CieLchuv other)
Parameters
other
CieLchuv
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Saturation()
Computes the saturation of the color (chroma normalized by lightness)
public float Saturation()
Returns
Remarks
A value ranging from 0 to 100.
ToString()
public override string ToString()
Returns
Operators
operator ==(CieLchuv, CieLchuv)
Compares two CieLchuv objects for equality.
public static bool operator ==(CieLchuv left, CieLchuv right)
Parameters
left
CieLchuvThe CieLchuv on the left side of the operand.
right
CieLchuvThe CieLchuv on the right side of the operand.
Returns
- bool
True if the current left is equal to the
right
parameter; otherwise, false.
operator !=(CieLchuv, CieLchuv)
Compares two CieLchuv objects for inequality
public static bool operator !=(CieLchuv left, CieLchuv right)
Parameters
left
CieLchuvThe CieLchuv on the left side of the operand.
right
CieLchuvThe CieLchuv on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
right
parameter; otherwise, false.