HsvColor Structure
Defines a color using the hue/saturation/value (HSV) model. This uses a cylindrical-coordinate representation of a color.
Definition
Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public readonly struct HsvColor : IEquatable<HsvColor>
Public Structure HsvColor
Implements IEquatable(Of HsvColor)
[<SealedAttribute>]
type HsvColor =
struct
inherit ValueType
interface IEquatable<HsvColor>
end
Inheritance | Object → ValueType → HsvColor |
Implements | IEquatable(HsvColor) |
Constructors
HsvColor(Color) | Initializes a new instance of the HsvColor struct. |
HsvColor(Double, Double, Double, Double) | Initializes a new instance of the HsvColor struct. |
Properties
A | Gets the Alpha (transparency) component in the range from 0..1 (percentage). |
H | Gets the Hue component in the range from 0..360 (degrees). This is the color's location, in degrees, on a color wheel/circle from 0 to 360. Note that 360 is equivalent to 0 and will be adjusted automatically. |
S | Gets the Saturation component in the range from 0..1 (percentage). |
V | Gets the Value (or Brightness/Intensity) component in the range from 0..1 (percentage). |
Methods
Equals(HsvColor) | Indicates whether the current object is equal to another object of the same type. |
Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueType.Equals(Object)) |
FromAhsv(Double, Double, Double, Double) | Creates a new HsvColor from individual color component values. |
FromHsv(Double, Double, Double) | Creates a new HsvColor from individual color component values. |
GetHashCode() | Gets a hashcode for this object. Hashcode is not guaranteed to be unique. (Overrides ValueType.GetHashCode()) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
Parse(String) | Parses an HSV color string. |
ToHsl() | Returns the HSL color model equivalent of this HSV color. |
ToHsl(Double, Double, Double, Double) | Converts the given HSVA color component values to their HSL color equivalent. |
ToRgb() | Returns the RGB color model equivalent of this HSV color. |
ToRgb(Double, Double, Double, Double) | Converts the given HSVA color component values to their RGB color equivalent. |
ToString() | Returns the fully qualified type name of this instance. (Overrides ValueType.ToString()) |
TryParse(String, HsvColor) | Parses an HSV color string. |
Operators
Equality(HsvColor, HsvColor) | Indicates whether the values of two specified HsvColor objects are equal. |
Explicit(HsvColor to Color) | Explicit conversion from an HsvColor to a Color. |
Inequality(HsvColor, HsvColor) | Indicates whether the values of two specified HsvColor objects are not equal. |