GradientStopOptions

Configuration options for a gradient color stop.

color? string

The color in any of the following formats:

Format Description
red The basic or extended CSS color name
#ff0000 The Hex RGB value
rgb(255, 0, 0) The RGB value

Specifying 'none', 'transparent', or ' ' (an empty string) clears the fill.

offset? number

The stop offset from the start of the element (see example). Ranges from zero (the start of the gradient) to one (the end of the gradient).

opacity? number

The fill opacity. Ranges from zero (completely transparent) to one (completely opaque).