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
vectorVector3The 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
hfloatThe h hue component.
sfloatThe s saturation component.
vfloatThe 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
otherHsv
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
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
leftHsvThe Hsv on the left side of the operand.
rightHsvThe Hsv on the right side of the operand.
Returns
- bool
True if the current left is equal to the
rightparameter; otherwise, false.
operator !=(Hsv, Hsv)
Compares two Hsv objects for inequality.
public static bool operator !=(Hsv left, Hsv right)
Parameters
leftHsvThe Hsv on the left side of the operand.
rightHsvThe Hsv on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
rightparameter; otherwise, false.