ButtonColors

Class

Android
public class ButtonColors(
    public val containerColor: Color,
    public val contentColor: Color,
    public val secondaryContentColor: Color,
    public val iconColor: Color,
    public val disabledContainerColor: Color,
    public val disabledContentColor: Color,
    public val disabledSecondaryContentColor: Color,
    public val disabledIconColor: Color,
)

Represents the container and content colors used in buttons in different states.

Parameters

containerColorThe background color of this Button when enabled (overridden by the containerPainter parameter on Buttons with image backgrounds).
contentColorThe content color of this Button when enabled.
secondaryContentColorThe content color of this Button when enabled.
iconColorThe content color of this Button when enabled.
disabledContainerColorThe background color of this Button when not enabled (overridden by the disabledContainerPainter parameter on Buttons with image backgrounds)
disabledContentColorThe content color of this Button when not enabled.
disabledSecondaryContentColorThe content color of this Button when not enabled.
disabledIconColorThe content color of this Button when not enabled.

Functions

public fun copy(
        containerColor: Color = Color.Unspecified,
        contentColor: Color = Color.Unspecified,
        secondaryContentColor: Color = Color.Unspecified,
        iconColor: Color = Color.Unspecified,
        disabledContainerColor: Color = Color.Unspecified,
        disabledContentColor: Color = Color.Unspecified,
        disabledSecondaryContentColor: Color = Color.Unspecified,
        disabledIconColor: Color = Color.Unspecified,
    ): ButtonColors

Returns a copy of this ButtonColors, optionally overriding some of the values.

Parameters

containerColorThe background color of this Button when enabled
contentColorThe content color of this Button when enabled
secondaryContentColorThe content color of this Button when enabled
iconColorThe content color of this Button when enabled
disabledContainerColorThe background color of this Button when not enabled
disabledContentColorThe content color of this Button when not enabled
disabledSecondaryContentColorThe content color of this Button when not enabled
disabledIconColorThe content color of this Button when not enabled