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
Vector3The 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
floatThe h hue component.
s
floatThe s saturation component.
v
floatThe v value (brightness) component.
Properties
H
Gets the hue component.
public float H { get; }
Property Value
S
Gets the saturation component.
public float S { get; }
Property Value
V
Gets the value (brightness) component.
public float V { get; }
Property Value
Methods
Equals(Hsv)
public bool Equals(Hsv other)
Parameters
other
Hsv
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(Hsv, Hsv)
Compares two Hsv objects for equality.
public static bool operator ==(Hsv left, Hsv right)
Parameters
left
HsvThe Hsv on the left side of the operand.
right
HsvThe 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
HsvThe Hsv on the left side of the operand.
right
HsvThe Hsv on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
right
parameter; otherwise, false.