# ColorHSL struct

Namespace: [Eto.Drawing](https://eto.picoe.ca/api/namespace/eto.drawing.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public struct ColorHSL : IEquatable<ColorHSL>
```

Color representation in the HSL color model

**Remarks:** This allows you to manage a color in the HSL cylindrical model. This is a helper class to handle HSL colors. Whenever a color is used it must be converted to a [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md) struct first, either by using [ColorHSL.ToColor()](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/tocolor.md) or the implicit conversion.

## Constructors

- [ColorHSL](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/ctor.md): (2 overloads) Initializes a new instance of the ColorHSL class with converted HSL values from a [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md)

## Properties

- [A](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/a.md): Gets or sets the alpha (0-1)
- [H](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/h.md): Gets or sets the hue (0-360)
- [L](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/l.md): Gets or sets the luminance (0-1)
- [S](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/s.md): Gets or sets the saturation (0-1)

## Methods

- [Distance](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/distance.md): (static) Calculates the 'distance' of two HSL colors
- [Equals](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/equals.md): (2 overloads) Compares the given object for equality with this object
- [GetHashCode](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/gethashcode.md): Gets the hash code for this object
- [ToColor](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/tocolor.md): Converts this HSL color to a RGB [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md) value

## Operators

- [operator ==](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/op-equality.md): (static) Compares two [ColorHSL](https://eto.picoe.ca/api/type/eto.drawing.colorhsl.md) objects for equality
- [operator !=](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/op-inequality.md): (static) Compares two [ColorHSL](https://eto.picoe.ca/api/type/eto.drawing.colorhsl.md) objects for equality

## Convertors

- [operator implicit](https://eto.picoe.ca/api/type/eto.drawing.colorhsl/op-implicit.md): (2 overloads, static) Implicitly converts a [ColorHSL](https://eto.picoe.ca/api/type/eto.drawing.colorhsl.md) to an RGB [Color](https://eto.picoe.ca/api/type/eto.drawing.color.md)
