class CardColors


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.

Summary

Public constructors

CardColors(
    containerPainter: Painter,
    contentColor: Color,
    appNameColor: Color,
    timeColor: Color,
    titleColor: Color,
    subtitleColor: Color
)

Public functions

CardColors
copy(
    containerColor: Color,
    contentColor: Color,
    appNameColor: Color,
    timeColor: Color,
    titleColor: Color,
    subtitleColor: Color
)

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

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

Public properties

Color

the color used for appName, only applies to AppCard.

Painter

Painter which is used to draw the background of this Card.

Color

the content color of this Card.

Color

the color used for subtitle, applies to TitleCard.

Color

the color used for time, applies to AppCard and TitleCard.

Color

the color used for title, applies to AppCard and TitleCard.

Public constructors

CardColors

CardColors(
    containerPainter: Painter,
    contentColor: Color,
    appNameColor: Color,
    timeColor: Color,
    titleColor: Color,
    subtitleColor: Color
)
Parameters
containerPainter: Painter

Painter which is used to draw the background of this Card.

contentColor: Color

the content color of this Card.

appNameColor: Color

the color used for appName, only applies to AppCard.

timeColor: Color

the color used for time, applies to AppCard and TitleCard.

titleColor: Color

the color used for title, applies to AppCard and TitleCard.

subtitleColor: Color

the color used for subtitle, applies to TitleCard.

Public functions

copy

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

The container color of this Card.

contentColor: Color = Color.Unspecified

The content color of this Card.

appNameColor: Color = Color.Unspecified

The color used for appName, only applies to AppCard.

timeColor: Color = Color.Unspecified

The color used for time, applies to AppCard and TitleCard.

titleColor: Color = Color.Unspecified

The color used for title, applies to AppCard and TitleCard.

subtitleColor: Color = Color.Unspecified

The color used for subtitle, applies to TitleCard.

equals

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

hashCode

open fun hashCode(): Int

Public properties

appNameColor

Added in 1.0.0-alpha28
val appNameColorColor

the color used for appName, only applies to AppCard.

containerPainter

Added in 1.0.0-alpha28
val containerPainterPainter

Painter which is used to draw the background of this Card.

contentColor

Added in 1.0.0-alpha28
val contentColorColor

the content color of this Card.

subtitleColor

Added in 1.0.0-alpha28
val subtitleColorColor

the color used for subtitle, applies to TitleCard.

timeColor

Added in 1.0.0-alpha28
val timeColorColor

the color used for time, applies to AppCard and TitleCard.

titleColor

Added in 1.0.0-alpha28
val titleColorColor

the color used for title, applies to AppCard and TitleCard.