---
title: "CardColors"
description: "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."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
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

| | |
| --- | --- |
| containerColor | the background color of this `Card` (overridden by the containerPainter parameter on Cards with image backgrounds). |
| contentColor | the content color of this `Card`. |
| appNameColor | the color used for appName, only applies to `AppCard`. |
| timeColor | the color used for time, applies to `AppCard` and `TitleCard`. |
| titleColor | the color used for title, applies to `AppCard` and `TitleCard`. |
| subtitleColor | the color used for subtitle, applies to `TitleCard`. |



## Functions

```kotlin
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

| | |
| --- | --- |
| containerColor | The container color of this `Card`. |
| contentColor | The content color of this `Card`. |
| appNameColor | The color used for appName, only applies to `AppCard`. |
| timeColor | The color used for time, applies to `AppCard` and `TitleCard`. |
| titleColor | The color used for title, applies to `AppCard` and `TitleCard`. |
| subtitleColor | The color used for subtitle, applies to `TitleCard`. |




