Colors
constructor(colors: Array<Color4f>, positions: FloatArray? = null, tileMode: FilterTileMode, colorSpace: ColorSpace? = null)
Parameters
colors
The span of colors for the gradient.
positions
Relative positions of each color across the gradient. If empty, the the colors are distributed evenly. If this is not null, the values must lie between 0.0 and 1.0, and be strictly increasing. If the first value is not 0.0, then an additional color stop is added at position 0.0, with the same color as colors0. If the the last value is less than 1.0, then an additional color stop is added at position 1.0, with the same color as colorscount - 1.
tileMode
Tiling mode for the gradient.
colorSpace
Optional colorspace associated with the span of colors. If this is null, the colors are treated as sRGB.