colorSequence

fun <T : ConvertibleToColorRGBa> colorSequence(vararg offsets: Pair<Double, T>): ColorSequence(source)

Creates a ColorSequence by accepting a variable number of pairs, where each pair consists of a position (Double) and a color (T). The positions represent the normalized range [0.0, 1.0]. The resulting ColorSequence can be used for creating interpolated colors between the specified positions.

Return

A ColorSequence containing the sorted sequence of colors and positions.

Parameters

offsets

Vararg parameter of pairs, where each pair includes a position (Double) and a color (of type T). The position defines the location along a normalized sequence [0.0, 1.0], and the color must implement ConvertibleToColorRGBa. Typically, positions must be sorted, but the function will sort them internally based on their position values.