class ButtonColors


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

Summary

Public constructors

ButtonColors(
    containerColor: Color,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)

Public functions

ButtonColors
copy(
    containerColor: Color,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)

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

open operator Boolean
equals(other: Any?)
open Int

Public properties

Color

The background color of this Button when enabled (overridden by the containerPainter parameter on Buttons with image backgrounds).

Color

The content color of this Button when enabled.

Color

The background color of this Button when not enabled (overridden by the disabledContainerPainter parameter on Buttons with image backgrounds)

Color

The content color of this Button when not enabled.

Color

The content color of this Button when not enabled.

Color

The content color of this Button when not enabled.

Color

The content color of this Button when enabled.

Color

The content color of this Button when enabled.

Public constructors

ButtonColors

Added in 1.5.0
ButtonColors(
    containerColor: Color,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)
Parameters
containerColor: Color

The background color of this Button when enabled (overridden by the containerPainter parameter on Buttons with image backgrounds).

contentColor: Color

The content color of this Button when enabled.

secondaryContentColor: Color

The content color of this Button when enabled.

iconColor: Color

The content color of this Button when enabled.

disabledContainerColor: Color

The background color of this Button when not enabled (overridden by the disabledContainerPainter parameter on Buttons with image backgrounds)

disabledContentColor: Color

The content color of this Button when not enabled.

disabledSecondaryContentColor: Color

The content color of this Button when not enabled.

disabledIconColor: Color

The content color of this Button when not enabled.

Public functions

copy

Added in 1.6.0
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
containerColor: Color = Color.Unspecified

The background color of this Button when enabled

contentColor: Color = Color.Unspecified

The content color of this Button when enabled

secondaryContentColor: Color = Color.Unspecified

The content color of this Button when enabled

iconColor: Color = Color.Unspecified

The content color of this Button when enabled

disabledContainerColor: Color = Color.Unspecified

The background color of this Button when not enabled

disabledContentColor: Color = Color.Unspecified

The content color of this Button when not enabled

disabledSecondaryContentColor: Color = Color.Unspecified

The content color of this Button when not enabled

disabledIconColor: Color = Color.Unspecified

The content color of this Button when not enabled

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

containerColor

val containerColor: Color

The background color of this Button when enabled (overridden by the containerPainter parameter on Buttons with image backgrounds).

contentColor

val contentColor: Color

The content color of this Button when enabled.

disabledContainerColor

val disabledContainerColor: Color

The background color of this Button when not enabled (overridden by the disabledContainerPainter parameter on Buttons with image backgrounds)

disabledContentColor

val disabledContentColor: Color

The content color of this Button when not enabled.

disabledIconColor

val disabledIconColor: Color

The content color of this Button when not enabled.

disabledSecondaryContentColor

val disabledSecondaryContentColor: Color

The content color of this Button when not enabled.

iconColor

val iconColor: Color

The content color of this Button when enabled.

secondaryContentColor

val secondaryContentColor: Color

The content color of this Button when enabled.