Gradient

fun Gradient(@ColorInt vararg colors: Int): Gradient

A smooth transition between colors for drawing gradients.

Parameters

colors

The sRGB colors (including alpha) to be evenly distributed along the gradient


fun Gradient(vararg colorsAndPositions: GradientColorAndPosition): Gradient

A smooth transition between colors for drawing gradients.

Parameters

colorsAndPositions

The colors and positions that should be used to create a gradient.