Table of Contents

Struct HSL

Namespace
PAC.Colour

Represents a colour in HSL form.

public struct HSL
Inherited Members

Constructors

HSL(Color)

public HSL(Color rgb)

Parameters

rgb Color

HSL(float, float, float)

public HSL(float hue, float saturation, float lightness)

Parameters

hue float
saturation float
lightness float

HSL(float, float, float, float)

public HSL(float hue, float saturation, float lightness, float alpha)

Parameters

hue float
saturation float
lightness float
alpha float

Properties

a

Alpha.

public float a { readonly get; set; }

Property Value

float

color

public Color color { get; }

Property Value

Color

h

Hue.

public float h { readonly get; set; }

Property Value

float

hsv

public HSV hsv { get; }

Property Value

HSV

l

Lightness.

public float l { readonly get; set; }

Property Value

float

s

Saturation.

public float s { readonly get; set; }

Property Value

float

Methods

ToColor()

public Color ToColor()

Returns

Color

ToHSV()

public HSV ToHSV()

Returns

HSV

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

ToString(int)

public string ToString(int decimalPlaces)

Parameters

decimalPlaces int

Returns

string

Operators

explicit operator Color(HSL)

public static explicit operator Color(HSL hsl)

Parameters

hsl HSL

Returns

Color

explicit operator HSV(HSL)

public static explicit operator HSV(HSL hsl)

Parameters

hsl HSL

Returns

HSV