mix

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

Weighted mix between two colors in the HSL color space.

Return

a mix of left and right weighted by x

Parameters

left

the left-hand ColorHSLa to mix

right

the right-hand ColorHSLa to mix

x

the weighting of colors, a value 0.0 is equivalent to left, 1.0 is equivalent to right and at 0.5 both colors contribute to the result equally


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

Weighted mix between two colors in the HSVa color space.

Return

a mix of left and right weighted by x

Parameters

left

the left-hand ColorHSVa to mix

right

the right-hand ColorHSVa to mix

x

the weighting of colors, a value 0.0 is equivalent to left, 1.0 is equivalent to right and at 0.5 both colors contribute to the result equally


Weighted mix between two colors in the LChAB color space.

Return

a mix of left and right weighted by x

Parameters

left

the left-hand ColorLCHABa to mix

right

the right-hand ColorLCHABa to mix

x

the weighting of colors, a value 0.0 is equivalent to left, 1.0 is equivalent to right and at 0.5 both colors contribute to the result equally


Weighted mix between two colors in the LChUV color space.

Return

a mix of left and right weighted by x

Parameters

x

the weighting of colors, a value 0.0 is equivalent to left, 1.0 is equivalent to right and at 0.5 both colors contribute to the result equally


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

Weighted mix between two colors in the generic RGB color space.

Return

a mix of left and right weighted by x

Parameters

x

the weighting of colors, a value 0.0 is equivalent to left, 1.0 is equivalent to right and at 0.5 both colors contribute to the result equally


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

Weighted mix between two colors in the XSL color space.

Return

a mix of left and right weighted by x

Parameters

x

the weighting of colors, a value 0.0 is equivalent to left, 1.0 is equivalent to right and at 0.5 both colors contribute to the result equally


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

Weighted mix between two colors in the XSV color space.

Return

a mix of left and right weighted by x

Parameters

x

the weighting of colors, a value 0.0 is equivalent to left, 1.0 is equivalent to right and at 0.5 both colors contribute to the result equally