mix

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

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

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

fun mix(left: ColorLCHABa, right: ColorLCHABa, x: Double): ColorLCHABa

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

fun mix(left: ColorLCHUVa, right: ColorLCHUVa, x: Double): ColorLCHUVa

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

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

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

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

fun mix(a: ColorYxya, b: ColorYxya, x: Double): ColorYxya