Struct Hsv
Represents a HSV (hue, saturation, value) color. Also known as HSB (hue, saturation, brightness).
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct Hsv : IEquatable<Hsv>
Constructors
| Edit this page View SourceHsv(Vector3)
Initializes a new instance of the Hsv struct.
Declaration
public Hsv(Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the h, s, v components. |
Hsv(float, float, float)
Initializes a new instance of the Hsv struct.
Declaration
public Hsv(float h, float s, float v)
Parameters
Type | Name | Description |
---|---|---|
float | h | The h hue component. |
float | s | The s saturation component. |
float | v | The v value (brightness) component. |
Properties
| Edit this page View SourceH
Gets the hue component.
Declaration
public float H { get; }
Property Value
Type | Description |
---|---|
float |
S
Gets the saturation component.
Declaration
public float S { get; }
Property Value
Type | Description |
---|---|
float |
V
Gets the value (brightness) component.
Declaration
public float V { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(Hsv)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Hsv other)
Parameters
Type | Name | Description |
---|---|---|
Hsv | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
| Edit this page View Sourceoperator ==(Hsv, Hsv)
Compares two Hsv objects for equality.
Declaration
public static bool operator ==(Hsv left, Hsv right)
Parameters
Type | Name | Description |
---|---|---|
Hsv | left | The Hsv on the left side of the operand. |
Hsv | right | The Hsv on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is equal to the |
operator !=(Hsv, Hsv)
Compares two Hsv objects for inequality.
Declaration
public static bool operator !=(Hsv left, Hsv right)
Parameters
Type | Name | Description |
---|---|---|
Hsv | left | The Hsv on the left side of the operand. |
Hsv | right | The Hsv on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is unequal to the |