Property

LocalRemoteContentColor

CompositionLocal containing the preferred content color for a given position in the hierarchy.

Source set: Android
public val LocalRemoteContentColor: ProvidableCompositionLocal<RemoteColor> = compositionLocalOf {
    RemoteColor(Color.White)
}

CompositionLocal containing the preferred content color for a given position in the hierarchy. This typically represents the on color for a color in RemoteColorScheme. For example, if the background color is RemoteColorScheme.surfaceContainer, this color is typically set to RemoteColorScheme.onSurface.

This color should be used for any typography / iconography, to ensure that the color of these adjusts when the background color changes. For example, on a dark background, text should be light, and on a light background, text should be dark.

Defaults to Color.White if no color has been explicitly set.

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: