Function

surfaceColorAtElevation

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

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

surfaceColorAtElevation

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