Table of Contents

Struct Hsv

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

Represents a HSV (hue, saturation, value) color. Also known as HSB (hue, saturation, brightness).

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

Constructors

Hsv(Vector3)

Initializes a new instance of the Hsv struct.

public Hsv(Vector3 vector)

Parameters

vector Vector3

The vector representing the h, s, v components.

Hsv(float, float, float)

Initializes a new instance of the Hsv struct.

public Hsv(float h, float s, float v)

Parameters

h float

The h hue component.

s float

The s saturation component.

v float

The v value (brightness) component.

Properties

H

Gets the hue component. A value ranging between 0 and 360.

public float H { get; }

Property Value

float

S

Gets the saturation component. A value ranging between 0 and 1.

public float S { get; }

Property Value

float

V

Gets the value (brightness) component. A value ranging between 0 and 1.

public float V { get; }

Property Value

float

Methods

Equals(Hsv)

public bool Equals(Hsv other)

Parameters

other Hsv

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 ==(Hsv, Hsv)

Compares two Hsv objects for equality.

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

Parameters

left Hsv

The Hsv on the left side of the operand.

right Hsv

The Hsv on the right side of the operand.

Returns

bool

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

operator !=(Hsv, Hsv)

Compares two Hsv objects for inequality.

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

Parameters

left Hsv

The Hsv on the left side of the operand.

right Hsv

The Hsv on the right side of the operand.

Returns

bool

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