Function

surfaceColorAtElevation

Computes the surface tonal color at different elevation levels e.g.

surfaceColorAtElevation

Source set: Common
public fun ColorScheme.surfaceColorAtElevation(elevation: Dp): Color

Computes the surface tonal color at different elevation levels e.g. surface1 through surface5.

Parameters

elevation Elevation value used to compute alpha of the color overlay layer.

Return

the ColorScheme.surface color with an alpha of the ColorScheme.surfaceTint color overlaid on top of it.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: