CardColors

@Immutable
class CardColors(val containerColor: Color, val contentColor: Color, val disabledContainerColor: Color, val disabledContentColor: Color)

Represents the container and content colors used in a card in different states.

Parameters

containerColor

the container color of this Card when enabled.

contentColor

the content color of this Card when enabled.

disabledContainerColor

the container color of this Card when not enabled.

disabledContentColor

the content color of this Card when not enabled.

Constructors

Link copied to clipboard
constructor(containerColor: Color, contentColor: Color, disabledContainerColor: Color, disabledContentColor: Color)

create an instance with arbitrary colors.

Properties

Link copied to clipboard
val containerColor: Color
Link copied to clipboard
val contentColor: Color
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(containerColor: Color = this.containerColor, contentColor: Color = this.contentColor, disabledContainerColor: Color = this.disabledContainerColor, disabledContentColor: Color = this.disabledContentColor): CardColors

Returns a copy of this CardColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int