Skip to content

IGradientStop

Type interface

A color stop in a gradient.

More info: Gradients

Sources

IGradientStop is an interface: it describes a shape of data and is not imported on its own.

Properties

brighten

Type undefined | number

Brightens the color by this amount, from -1 to 1, adding the same amount to each channel. A negative value dims it.

More info: Gradients: brightness

color

Type Color

Color.

lighten

Type undefined | number

Lightens the color by this amount, from -1 to 1: 0.2 moves it 20% of the way to white. A negative value darkens it.

More info: Gradients: brightness

offset

Type undefined | number

Where the color sits along the gradient, from 0 (start) to 1 (end).

Stops without an offset are spaced evenly.

opacity

Type undefined | numberDefault 1

Opacity of the color, from 0 (transparent) to 1 (opaque).