Type
StopInput
type StopInput =
| ColorSource
| [number, ColorSource]
| [number, ColorSource, number]
| {
alpha?: number;
color: ColorSource;
offset: number;
};
A color stop: a bare color (stops are spread evenly), [offset, color],
[offset, color, alpha] or { offset, color, alpha }.
Union Members#
ColorSource
[number, ColorSource]
[number, ColorSource, number]
Type Literal#
{
alpha?: number;
color: ColorSource;
offset: number;
}
| Name | Type | Description | Defined in |
|---|---|---|---|
alpha? | number | Opacity of the stop, from 0 to 1. Default 1. | gradient.ts:19 |
color | ColorSource | Colour of the stop. | gradient.ts:17 |
offset | number | Position on the ramp, from 0 to 1. | gradient.ts:15 |