Table of Contents

Struct HunterLab

Namespace
SixLabors.ImageSharp.ColorSpaces
Assembly
SixLabors.ImageSharp.dll

Represents an Hunter LAB color. https://en.wikipedia.org/wiki/Lab_color_space.

public readonly struct HunterLab : IEquatable<HunterLab>
Implements
Inherited Members

Constructors

HunterLab(Vector3)

Initializes a new instance of the HunterLab struct.

public HunterLab(Vector3 vector)

Parameters

vector Vector3

The vector representing the l, a, b components.

Remarks

Uses DefaultWhitePoint as white point.

HunterLab(Vector3, CieXyz)

Initializes a new instance of the HunterLab struct.

public HunterLab(Vector3 vector, CieXyz whitePoint)

Parameters

vector Vector3

The vector representing the l a b components.

whitePoint CieXyz

The reference white point. Illuminants

HunterLab(float, float, float)

Initializes a new instance of the HunterLab struct.

public HunterLab(float l, float a, float b)

Parameters

l float

The lightness dimension.

a float

The a (green - magenta) component.

b float

The b (blue - yellow) component.

Remarks

Uses DefaultWhitePoint as white point.

HunterLab(float, float, float, CieXyz)

Initializes a new instance of the HunterLab struct.

public HunterLab(float l, float a, float b, CieXyz whitePoint)

Parameters

l float

The lightness dimension.

a float

The a (green - magenta) component.

b float

The b (blue - yellow) component.

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

A

Gets the a color component. A value usually ranging from -100 to 100. Negative is green, positive magenta.

public float A { get; }

Property Value

float

B

Gets the b color component. A value usually ranging from -100 to 100. Negative is blue, positive is yellow

public float B { get; }

Property Value

float

L

Gets the lightness dimension. A value usually 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(HunterLab)

public bool Equals(HunterLab other)

Parameters

other HunterLab

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(HunterLab, HunterLab)

Compares two HunterLab objects for equality.

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

Parameters

left HunterLab

The HunterLab on the left side of the operand.

right HunterLab

The HunterLab on the right side of the operand.

Returns

bool

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

operator !=(HunterLab, HunterLab)

Compares two HunterLab objects for inequality

public static bool operator !=(HunterLab left, HunterLab right)

Parameters

left HunterLab

The HunterLab on the left side of the operand.

right HunterLab

The HunterLab on the right side of the operand.

Returns

bool

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