background

fun background(color: ColorSchema, alpha: Float = 1.0f)

Sets a solid-color background — shorthand for background(solidColor(color, alpha)).

Parameters

color

Fill color of the background.

alpha

Opacity applied on top of color's own alpha, from 0f to 1f. Defaults to 1f.


fun background(background: BackgroundSchema)

Sets the tile's background, built with solidColor or one of the gradient helpers (linearGradient, horizontalGradient, verticalGradient, radialGradient, sweepGradient).