surfaceColorAtElevation

Function

Common
fun ColorScheme.surfaceColorAtElevation(elevation: Dp): Color

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

Parameters

elevationElevation 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.