Documentation
    Preparing search index...

    Interface GradientStop

    One colour stop of a §58 gradient paint: where along the gradient's axis it sits (0…1) and the colour there.

    Stops must be authored sorted — offsets non-decreasing — and are refused out of order rather than re-sorted (§85: nothing is silently reinterpreted). Two stops may share an offset, which is a hard edge: the earlier colour holds strictly before it, the later one from it on. Before the first stop and past the last the gradient pads with that stop's colour (CSS's and Canvas's rule), which is also what the lowering's saturate arithmetic produces with no case of its own.

    interface GradientStop {
        color: ColorRGBA;
        offset: number;
    }
    Index
    color: ColorRGBA

    Straight, linear-light RGBA at this stop (§60a). Copied on assignment.

    offset: number

    Position along the gradient axis; finite, in 0…1 (§85).