Google is committed to advancing racial equity for Black communities. See how.

EmphasisLevels

interface EmphasisLevels
androidx.compose.material.EmphasisLevels

EmphasisLevels represents the different levels of Emphasis that can be applied to a component.

By default, the Emphasis implementation for each level varies depending on the color being emphasized (typically AmbientContentColor). This ensures that the Emphasis has the correct contrast for the background they are on, as Colors.primary surfaces typically require higher contrast for the content color than Colors.surface surfaces to ensure they are accessible.

This typically should not be customized as the default implementation is optimized for correct accessibility and contrast on different surfaces.

See AmbientEmphasisLevels to retrieve the current EmphasisLevels

Summary

Properties
abstract Emphasis

Emphasis used to express disabled state, such as for a disabled button.

abstract Emphasis

Emphasis used to express high emphasis, such as for selected text fields.

abstract Emphasis

Emphasis used to express medium emphasis, such as for placeholder text in a text field.

Properties

disabled

@Composable abstract val disabled: Emphasis

Emphasis used to express disabled state, such as for a disabled button.

high

@Composable abstract val high: Emphasis

Emphasis used to express high emphasis, such as for selected text fields.

medium

@Composable abstract val medium: Emphasis

Emphasis used to express medium emphasis, such as for placeholder text in a text field.