Table of Contents

Struct ColorHSL

Namespace
Gamelogic.Colors
Assembly
Gamelogic.Colors.dll

Class for representing colors in the HSL color space.

[Version(1, 0, 0)]
[Serializable]
public struct ColorHSL
Inherited Members
Extension Methods

Constructors

ColorHSL(float, float, float)

Constructor with ColorHSL

ColorHSL(Color)

Constructs a new ColorHSL that represents the given color.

Fields

Black

ColorHSL that represents black.

White

ColorHSL that represents white.

Properties

Color

Convert from the current ColorHSL to an RGB Color.

H

Gets the Hue value

L

Gets or sets the Luminance value

S

Gets the Saturation value.

Methods

GetShades(int)
GetTints(int)
Invert()

Gets a copy of this ColorHSL but inverted.

InvertLuminance()

Gets a copy of this ColorHSL with the luminance inverted.

InvertSaturation()

Gets a copy of this ColorHSL with the saturation inverted.

Lerp(ColorHSL, ColorHSL, float)

Linearly interpolates between the given colors in HSL color space.

Lerp(Color, Color, float)

Linearly interpolates between the given colors in HSL color space.

ToString()

Gives a string representation of this color.

WithHue(float)

Gets a copy of this ColorHSL with the given hue.

WithHueOffset(float)

Gets a copy of this ColorHSL with the given hue offset.

WithLuminance(float)

Gets a copy of this ColorHSL with the given luminance.

WithLuminanceOffset(float)

Gets a copy of this ColorHSL with the given luminance offset.

WithSaturation(float)

Gets a copy of this ColorHSL with the given saturation.

WithSaturationOffset(float)

Gets a copy of this ColorHSL with the given saturation offset.