androidx.compose.material3

CardColors

Class

No hand-written docs yet.

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

class CardColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
)

How to get one

Create it

Ready-made values and functions that return it

Used by

Parameters that take a CardColors.

Properties

containerColor

val containerColor: Color

contentColor

val contentColor: Color

disabledContainerColor

val disabledContainerColor: Color

disabledContentColor

val disabledContentColor: Color

Functions

copy

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”

Library docs

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