ContentColorKt

public final class ContentColorKt


Summary

Public fields

final @NonNull ProvidableCompositionLocal<@NonNull Color>

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

Public fields

LocalContentColor

@NonNull
public final @NonNull ProvidableCompositionLocal<@NonNull ColorLocalContentColor

CompositionLocal containing the preferred content color for a given position in the hierarchy. This typically represents the on color for a color in Colors. For example, if the background color is Colors.surface, this color is typically set to Colors.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.