openrndr / org.openrndr.color / mix

mix

fun mix(left: ColorHSLa, right: ColorHSLa, x: Double): ColorHSLa (source)

Mixes two colors in HSLa space

Parameters

left - the left hand ColorHSLa color

right - the right hand ColorHSLa

x - the mix amount

Return
a mix of left and right, x == 0.0 corresponds with left, x == 1.0 corresponds with right

fun mix(left: ColorHSVa, right: ColorHSVa, x: Double): ColorHSVa (source)

Mixes two colors in HSVa space

Parameters

left - the left hand ColorHSVa color

right - the right hand ColorHSVa

x - the mix amount

Return
a mix of left and right, x == 0.0 corresponds with left, x == 1.0 corresponds with right

fun mix(left: ColorLCHABa, right: ColorLCHABa, x: Double): ColorLCHABa (source)
fun mix(left: ColorLCHUVa, right: ColorLCHUVa, x: Double): ColorLCHUVa (source)
fun mix(a: ColorYxya, b: ColorYxya, x: Double): ColorYxya (source) fun mix(left: ColorRGBa, right: ColorRGBa, x: Double): ColorRGBa (source)

Mixes two colors in RGBa space

fun mix(left: ColorXSLa, right: ColorXSLa, x: Double): ColorXSLa (source)

Mixes two colors in XSLa space

Parameters

left - the left hand ColorXSLa color

right - the right hand ColorXSLa

x - the mix amount

Return
a mix of left and right, x == 0.0 corresponds with left, x == 1.0 corresponds with right

fun mix(left: ColorXSVa, right: ColorXSVa, x: Double): ColorXSVa (source)

Mixes two colors in XSVa space

Parameters

left - the left hand ColorXSVa color

right - the right hand ColorXSVa

x - the mix amount

Return
a mix of left and right, x == 0.0 corresponds with left, x == 1.0 corresponds with right