InterfaceLinearGradientOptions

interface LinearGradientOptions {
    angle?: number;
    stops: number[] | Record<number, number>;
}

Hierarchy (View Summary)

Properties

Properties

angle?: number

The direction of the gradient in degrees, like CSS' linear-gradient(): 0 goes up, 90 to the right, 180 down, 270 to the left. The first stop is at the start of the line through the center that touches the corners. Default: 180

stops: number[] | Record<number, number>

The colors along the gradient: their positions (0..1) and colors, like Colors.gradient takes them ({ 0: 0xff0000ff, 0.5: 0xffff00ff, 1: 0x00ff00ff }), or just the colors, evenly spaced ([0xff0000ff, 0x00ff00ff])