nx.js
Classes

CanvasGradient

Accessors

_opaque

get _opaque(): any

Internal

Returns

any

Methods

addColorStop()

addColorStop(offset, color): void

Adds a new color stop, defined by an offset and a color, to a given canvas gradient.

Parameters

ParameterTypeDescription
offsetnumberA 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.
colorstringA CSS color string representing the color of the stop.

Returns

void

See

https://developer.mozilla.org/docs/Web/API/CanvasGradient/addColorStop

On this page