Click or drag to resize

ColorHSL Structure

Color representation in the HSL color model

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public struct ColorHSL : IEquatable<ColorHSL>

The ColorHSL type exposes the following members.

Constructors
  NameDescription
Public methodColorHSL(Color)
Initializes a new instance of the ColorHSL class with converted HSL values from a Color
Public methodColorHSL(Single, Single, Single, Single)
Initializes a new instance of the ColorHSL class
Top
Properties
  NameDescription
Public propertyA
Gets or sets the alpha (0-1)
Public propertyH
Gets or sets the hue (0-360)
Public propertyL
Gets or sets the luminance (0-1)
Public propertyS
Gets or sets the saturation (0-1)
Top
Methods
  NameDescription
Public methodStatic memberDistance
Calculates the 'distance' of two HSL colors
Public methodEquals(Object)
Compares the given object for equality with this object
(Overrides ValueTypeEquals(Object).)
Public methodEquals(ColorHSL)
Compares the given object for equality with this object
Public methodGetHashCode
Gets the hash code for this object
(Overrides ValueTypeGetHashCode.)
Public methodToColor
Converts this HSL color to a RGB Color value
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two ColorHSL objects for equality
Public operatorStatic member(Color to ColorHSL)
Implicitly converts from a Color to a ColorHSL
Public operatorStatic member(ColorHSL to Color)
Implicitly converts a ColorHSL to an RGB Color
Public operatorStatic memberInequality
Compares two ColorHSL objects for equality
Top
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 struct first, either by using ToColor or the implicit conversion.
See Also