openrndr / org.openrndr.color / ColorHSLa

ColorHSLa

data class ColorHSLa : ConvertibleToColorRGBa, ShadableColor<ColorHSLa>, HueShiftableColor<ColorHSLa>, SaturatableColor<ColorHSLa>, AlgebraicColor<ColorHSLa> (source)

color in HSL space

Parameters

h - hue in degrees (0 .. 360)

s - saturation (0.0 .. 1.0)

l - lightness (0.0 .. 1.0)

a - alpha (0.0. .. 1.0)

Constructors

<init>

color in HSL space

ColorHSLa(h: Double, s: Double, l: Double, a: Double = 1.0)

Properties

a

alpha (0.0. .. 1.0)

val a: Double

h

hue in degrees (0 .. 360)

val h: Double

l

lightness (0.0 .. 1.0)

val l: Double

s

saturation (0.0 .. 1.0)

val s: Double

unit

val unit: ColorHSLa

Functions

invoke

operator fun invoke(h: Double = this.h, s: Double = this.s, l: Double = this.l, a: Double = this.a): ColorHSLa

minus

fun minus(other: ColorHSLa): ColorHSLa

mix

fun mix(other: ColorHSLa, x: Double): ColorHSLa

plus

fun plus(other: ColorHSLa): ColorHSLa

saturate

adjust saturation by multiplication

fun saturate(factor: Double): ColorHSLa

shade

shades the color by multiplication

fun shade(factor: Double): ColorHSLa

shiftHue

shift the hue by a given amount of degrees

fun shiftHue(shiftInDegrees: Double): ColorHSLa

times

fun times(factor: Double): ColorHSLa

toHSVa

fun toHSVa(): ColorHSVa

toLABa

fun toLABa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLABa

toLCHABa

fun toLCHABa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLCHABa

toLCHUVa

fun toLCHUVa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLCHUVa

toLUVa

fun toLUVa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLUVa

toRGBa

convert to ColorRGBa

fun toRGBa(): ColorRGBa

toString

fun toString(): String

toXSLa

convert to ColorXSLa

fun toXSLa(): ColorXSLa

toXYZa

fun toXYZa(): ColorXYZa

Companion Object Functions

fromRGBa

fun fromRGBa(rgb: ColorRGBa): ColorHSLa