Struct Hsl
Represents a Hsl (hue, saturation, lightness) color.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct Hsl : IEquatable<Hsl>
Constructors
| Improve this Doc View SourceHsl(Vector3)
Initializes a new instance of the Hsl struct.
Declaration
public Hsl(Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | The vector representing the h, s, l components. |
Hsl(Single, Single, Single)
Initializes a new instance of the Hsl struct.
Declaration
public Hsl(float h, float s, float l)
Parameters
Type | Name | Description |
---|---|---|
Single | h | The h hue component. |
Single | s | The s saturation component. |
Single | l | The l value (lightness) component. |
Fields
| Improve this Doc View SourceH
Gets the hue component.
Declaration
public readonly float H
Field Value
Type | Description |
---|---|
Single |
L
Gets the lightness component.
Declaration
public readonly float L
Field Value
Type | Description |
---|---|
Single |
S
Gets the saturation component.
Declaration
public readonly float S
Field Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceEquals(Hsl)
Declaration
public readonly bool Equals(Hsl other)
Parameters
Type | Name | Description |
---|---|---|
Hsl | 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(Hsl, Hsl)
Compares two Hsl objects for equality.
Declaration
public static bool operator ==(Hsl left, Hsl right)
Parameters
Type | Name | Description |
---|---|---|
Hsl | left | The Hsl on the left side of the operand. |
Hsl | right | The Hsl on the right side of the operand. |
Returns
Type | Description |
---|---|
Boolean | True if the current left is equal to the |
Inequality(Hsl, Hsl)
Compares two Hsl objects for inequality.
Declaration
public static bool operator !=(Hsl left, Hsl right)
Parameters
Type | Name | Description |
---|---|---|
Hsl | left | The Hsl on the left side of the operand. |
Hsl | right | The Hsl on the right side of the operand. |
Returns
Type | Description |
---|---|
Boolean | True if the current left is unequal to the |