horizontalGradient

fun horizontalGradient(vararg colorStops: Pair<Float, Color>): Brush

A gradient running left to right across the full width of what it decorates.

Return

the gradient brush.

Parameters

colorStops

where each color sits along the gradient, as a fraction of the width from 0f to 1f; at least one stop is required.

See also