color

fun color(t0: Double, t1: Double, steps: Int): List<ColorRGBa>(source)

Generates a sequence of interpolated colors between two specified values.

Return

A List of interpolated colors.

Parameters

t0

A Double representing the start value for interpolation.

t1

A Double representing the end value for interpolation.

steps

An Int representing the number of colors to generate in the sequence.


fun color(t: Double): ColorRGBa(source)

Calculates a color using interpolation based on the provided parameter t.

Return

A ColorRGBa instance representing the interpolated color in the sRGB color space. If the provided t is outside the range of the sequence, the color at the nearest boundary will be returned.

Parameters

t

A Double representing the position along the color sequence, typically ranging from 0.0 to 1.0. It indicates how far between the sequence colors the interpolation should occur, with 0.0 being the start of the sequence and 1.0 being the end.