module:LinearGradient

Linear-gradient class
linear-gradient demo

Constructor

new module:LinearGradient(fromPosition, toPosition, colorStops)

Linear-gradient constructor

Parameters:
NameTypeDescription
fromPositionPositionDefinition

Starting position of the gradient

toPositionPositionDefinition

Ending position of the gradient

colorStopsObject

Set of colors to go through (key is position [from 0 to 1], value is the color)

Example
new LinearGradient(from, to, { 0: "red", 1: "green" });