openrndr / org.openrndr.color / ColorHSVa

ColorHSVa

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

A color respresentation in HSVa space

Parameters

h - hue in n * [0, 360)

s - value in 0,1

v - value in 0,1

a - alpha in 0,1

Constructors

<init>

A color respresentation in HSVa space

ColorHSVa(h: Double, s: Double, v: Double, a: Double = 1.0)

Properties

a

alpha in 0,1

val a: Double

h

hue in n * [0, 360)

val h: Double

s

value in 0,1

val s: Double

unit

a unit presentation of this ColorHSVa, essentially brings the hue back in [0, 360)

val unit: ColorHSVa

v

value in 0,1

val v: Double

Functions

invoke

operator fun invoke(h: Double = this.h, s: Double = this.s, v: Double = this.v, a: Double = this.a): ColorHSVa

minus

fun minus(other: ColorHSVa): ColorHSVa

mix

fun mix(other: ColorHSVa, factor: Double): ColorHSVa

plus

fun plus(other: ColorHSVa): ColorHSVa

saturate

adjust saturation by multiplication

fun saturate(factor: Double): ColorHSVa

shade

shades the color by multiplication

fun shade(factor: Double): ColorHSVa

shiftHue

shift the hue by a given amount of degrees

fun shiftHue(shiftInDegrees: Double): ColorHSVa

times

fun times(factor: Double): ColorHSVa

toRGBa

convert to ColorRGBa

fun toRGBa(): ColorRGBa

toXSVa

fun toXSVa(): ColorXSVa

Companion Object Functions

fromRGBa

fun fromRGBa(rgb: ColorRGBa): ColorHSVa