interpolator

Build an interpolator that will produce colors in this color space.

Example

RGB.interpolator {
stop(RGB("#f00"))
stop(RGB("#0f0"), 0.25)
stop(RGB("#00f"))
}

See also


fun <T : Color> ColorSpace<T>.interpolator(vararg stops: Color, premultiplyAlpha: Boolean = true): Interpolator<T>

Build a linear interpolator with two or more evenly spaced stops.

Example

RGB.interpolator(RGB("#f00"), RGB("#00f"))

Parameters

premultiplyAlpha

If true, multiply each color's components be the color's alpha value before interpolating, and divide the result by its alpha.

See also