CardColors

Class

Android
public class CardColors(
    public val containerColor: Color,
    public val contentColor: Color,
    public val appNameColor: Color,
    public val timeColor: Color,
    public val titleColor: Color,
    public val subtitleColor: Color,
)

Represents Colors used in Card. Unlike other Material 3 components, Cards do not change their color appearance when they are disabled. All colors remain the same in enabled and disabled states.

Parameters

containerColorthe background color of this Card (overridden by the containerPainter parameter on Cards with image backgrounds).
contentColorthe content color of this Card.
appNameColorthe color used for appName, only applies to AppCard.
timeColorthe color used for time, applies to AppCard and TitleCard.
titleColorthe color used for title, applies to AppCard and TitleCard.
subtitleColorthe color used for subtitle, applies to TitleCard.

Functions

public fun copy(
        containerColor: Color = Color.Unspecified,
        contentColor: Color = Color.Unspecified,
        appNameColor: Color = Color.Unspecified,
        timeColor: Color = Color.Unspecified,
        titleColor: Color = Color.Unspecified,
        subtitleColor: Color = Color.Unspecified,
    ): CardColors

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

Parameters

containerColorThe container color of this Card.
contentColorThe content color of this Card.
appNameColorThe color used for appName, only applies to AppCard.
timeColorThe color used for time, applies to AppCard and TitleCard.
titleColorThe color used for title, applies to AppCard and TitleCard.
subtitleColorThe color used for subtitle, applies to TitleCard.