Adds a new color stop, defined by an offset and a color, to a given canvas gradient.
A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end.
A CSS color value representing the color of the stop.
The
Gradientinterface represents an opaque object describing gradient. It is returned by the methods Canvas.createLinearGradient, Canvas.createRadialGradient.It can be used as a Canvas.fillStyle or Canvas.strokeStyle.