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
| Improve this Doc 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(Single, Single, Single)
Initializes a new instance of the Hsv struct.
Declaration
public Hsv(float h, float s, float v)
Parameters
Type | Name | Description |
---|---|---|
Single | h | The h hue component. |
Single | s | The s saturation component. |
Single | v | The v value (brightness) component. |
Fields
| Improve this Doc View SourceH
Gets the hue component.
Declaration
public readonly float H
Field Value
Type | Description |
---|---|
Single |
S
Gets the saturation component.
Declaration
public readonly float S
Field Value
Type | Description |
---|---|
Single |
V
Gets the value (brightness) component.
Declaration
public readonly float V
Field Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceEquals(Hsv)
Declaration
public readonly bool Equals(Hsv other)
Parameters
Type | Name | Description |
---|---|---|
Hsv | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
| Improve this Doc View SourceEquality(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 |
---|---|
Boolean | True if the current left is equal to the |
Inequality(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 |
---|---|
Boolean | True if the current left is unequal to the |