HslColor Struct
Definition
Defines a color using the hue/saturation/lightness (HSL) model. This uses a cylindrical-coordinate representation of a color.
public struct HslColor
Constructors
| Name | Description |
|---|---|
| HslColor (2 overloads) | Initializes a new instance of the Avalonia.Media.HslColor struct. |
HslColor overloads
HslColor Constructor
Initializes a new instance of the Avalonia.Media.HslColor struct.
public HslColor(Avalonia.Media.Color color)
Parameters
color Avalonia.Media.Color
The RGB color to convert to HSL.
HslColor Constructor
Initializes a new instance of the Avalonia.Media.HslColor struct.
public HslColor(double alpha, double hue, double saturation, double lightness)
Parameters
alpha double
The Alpha (transparency) component in the range from 0..1.
hue double
The Hue component in the range from 0..360. Note that 360 is equivalent to 0 and will be adjusted automatically.
saturation double
The Saturation component in the range from 0..1.
lightness double
The Lightness component in the range from 0..1.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| FromAhsl | Creates a new Avalonia.Media.HslColor from individual color component values. |
| FromHsl | Creates a new Avalonia.Media.HslColor from individual color component values. |
| GetHashCode | Gets a hashcode for this object. Hashcode is not guaranteed to be unique. |
| Parse | Parses an HSL color string. |
| ToHsv (2 overloads) | Returns the HSV color model equivalent of this HSL color. |
| ToRgb (2 overloads) | Returns the RGB color model equivalent of this HSL color. |
| ToString | No summary available. |
| TryParse | No summary available. |
Equals overloads
Equals Method
public bool Equals(Avalonia.Media.HslColor other)
Parameters
other Avalonia.Media.HslColor
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool