Gradient

constructor(colors: Array<Int>, startPoints: Array<Float>)

Creates a Gradient with the given colors and starting points. These are given as parallel arrays.

Parameters

colors

The colors to be used in the gradient

startPoints

The starting point for each color, given as a percentage of the maximum intensity This is given as an array of floats with values in the interval [0,1]


constructor(colors: Array<Int>, startPoints: Array<Float>, colorMapSize: Int)

Creates a Gradient with the given colors and starting points which creates a colorMap of given size. The colors and starting points are given as parallel arrays.

Parameters

colors

The colors to be used in the gradient

startPoints

The starting point for each color, given as a percentage of the maximum intensity This is given as an array of floats with values in the interval [0,1]

colorMapSize

The size of the colorMap to be generated by the Gradient