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

ButtonColors

@Stable interface ButtonColors
androidx.compose.material.ButtonColors

Represents the background and content colors used in a button in different states.

See ButtonConstants.defaultButtonColors for the default colors used in a Button. See ButtonConstants.defaultOutlinedButtonColors for the default colors used in a OutlinedButton. See ButtonConstants.defaultTextButtonColors for the default colors used in a TextButton.

Summary

Public methods
abstract Color

Represents the background color for this button, depending on enabled.

abstract Color

Represents the content color for this button, depending on enabled.

Public methods

backgroundColor

abstract fun backgroundColor(enabled: Boolean): Color

Represents the background color for this button, depending on enabled.

Parameters
enabled: Boolean whether the button is enabled

contentColor

abstract fun contentColor(enabled: Boolean): Color

Represents the content color for this button, depending on enabled.

Parameters
enabled: Boolean whether the button is enabled