Function

surfaceColorAtElevation

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

Source set: Common

Added in 1.5.0-alpha17

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.

Returns

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