interpolator
fun <T : Color> ColorSpace<T>.interpolator(builder: InterpolatorBuilder.() -> Unit): Interpolator<T>
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"))
}
Content copied to clipboard
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"))
Content copied to clipboard
Parameters
premultiply Alpha
If true, multiply each color's components be the color's alpha value before interpolating, and divide the result by its alpha.