sweepGradient

fun sweepGradient(vararg colorStops: Pair<Float, ColorSchema>, center: OffsetSchema? = null, alpha: Float = 1.0f): BackgroundSchema.SweepGradient

Sweep (conic) gradient background rotating around center, with explicit color stops. center left null means the tile's own center.

Parameters

colorStops

Explicit stop to color pairs, e.g. 0f to color(...).

center

Center point the gradient sweeps around. Defaults to none (the tile's center).

alpha

Opacity applied to the whole gradient, from 0f to 1f. Defaults to 1f.


fun sweepGradient(colors: List<ColorSchema>, center: OffsetSchema? = null, alpha: Float = 1.0f): BackgroundSchema.SweepGradient

Sweep (conic) gradient background rotating around center, with colors spread evenly around the sweep. center left null means the tile's own center.

Parameters

colors

Colors spread evenly around the gradient.

center

Center point the gradient sweeps around. Defaults to none (the tile's center).

alpha

Opacity applied to the whole gradient, from 0f to 1f. Defaults to 1f.