Table of Contents

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 Vector3

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.

public CieLchuv(Vector3 vector, CieXyz whitePoint)

Parameters

vector Vector3

The vector representing the l, c, h components.

whitePoint CieXyz

The 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 float

The lightness dimension.

c float

The chroma, relative saturation.

h float

The 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 float

The lightness dimension.

c float

The chroma, relative saturation.

h float

The hue in degrees.

whitePoint CieXyz

The reference white point. Illuminants

Fields

DefaultWhitePoint

D50 standard illuminant. Used when reference white is not specified explicitly.

public static readonly CieXyz DefaultWhitePoint

Field Value

CieXyz

Properties

C

Gets the a chroma component. A value ranging from 0 to 200.

public float C { get; }

Property Value

float

H

Gets the h° hue component in degrees. A value ranging from 0 to 360.

public float H { get; }

Property Value

float

L

Gets the lightness dimension. A value ranging between 0 (black), 100 (diffuse white) or higher (specular white).

public float L { get; }

Property Value

float

WhitePoint

Gets the reference white point of this color

public CieXyz WhitePoint { get; }

Property Value

CieXyz

Methods

Equals(CieLchuv)

public bool Equals(CieLchuv other)

Parameters

other CieLchuv

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Saturation()

Computes the saturation of the color (chroma normalized by lightness)

public float Saturation()

Returns

float

The float

Remarks

A value ranging from 0 to 100.

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CieLchuv, CieLchuv)

Compares two CieLchuv objects for equality.

public static bool operator ==(CieLchuv left, CieLchuv right)

Parameters

left CieLchuv

The CieLchuv on the left side of the operand.

right CieLchuv

The 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 CieLchuv

The CieLchuv on the left side of the operand.

right CieLchuv

The CieLchuv on the right side of the operand.

Returns

bool

True if the current left is unequal to the right parameter; otherwise, false.