interface Gradient {
    type: "radial" | "linear";
    rotation?: number;
    colorStops: { offset: number; color: string }[];
}

Properties

type: "radial" | "linear"

Type of gradient spread

GradientType.linear
rotation?: number

Rotation of gradient (in radians, Math.PI === 180 degrees)

0
colorStops: { offset: number; color: string }[]

Gradient colors.

Type declaration

  • offset: number

    Position of color in gradient range

  • color: string

    Color of stop in gradient range