# CardColors

Artifact: [androidx.wear.protolayout:protolayout-material3](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/material3/CardDefaults.kt+class:androidx.wear.protolayout.material3.CardColors) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

*** ** * ** ***


```
public final class CardColors
```

<br />

*** ** * ** ***

Represents colors used in card components, such as `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).titleCard(androidx.wear.protolayout.ModifiersBuilders.Clickable,kotlin.Function1,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Function1,kotlin.Function1,androidx.wear.protolayout.DimensionBuilders.ContainerDimension,androidx.wear.protolayout.ModifiersBuilders.Corner,androidx.wear.protolayout.material3.CardColors,kotlin.Function1,androidx.wear.protolayout.material3.TitleCardStyle,androidx.wear.protolayout.ModifiersBuilders.Padding,kotlin.Int)` or `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).appCard(androidx.wear.protolayout.ModifiersBuilders.Clickable,kotlin.Function1,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Function1,kotlin.Function1,kotlin.Function1,kotlin.Function1,androidx.wear.protolayout.DimensionBuilders.ContainerDimension,androidx.wear.protolayout.ModifiersBuilders.Corner,androidx.wear.protolayout.material3.CardColors,kotlin.Function1,androidx.wear.protolayout.material3.AppCardStyle,androidx.wear.protolayout.ModifiersBuilders.Padding)`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#CardColors(androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.types.LayoutColor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor backgroundColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor titleColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor contentColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor timeColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryIconColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryTextColor, https://developer.android.com/reference/androidx/wear/protolayout/material3/ProgressIndicatorColors graphicProgressIndicatorColors, https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor graphicIconColor )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#copy(androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.types.LayoutColor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor backgroundColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor titleColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor contentColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor timeColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryIconColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryTextColor, https://developer.android.com/reference/androidx/wear/protolayout/material3/ProgressIndicatorColors graphicProgressIndicatorColors, https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor graphicIconColor )` Returns a copy of this `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors`, optionally overriding some of the values. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getBackgroundColor()()` `https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` which is used to as the background color for the card. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getContentColor()()` the content color for the card. |
| `final https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getGraphicIconColor()()` the color used for the icon to be put at the center of the progress indicator to compose the graphic. |
| `final https://developer.android.com/reference/androidx/wear/protolayout/material3/ProgressIndicatorColors` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getGraphicProgressIndicatorColors()()` the color used for the progress indicator set as graphic of the card. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getLabelColor()()` the color used for label for the card. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getSecondaryIconColor()()` the color used for icon in the data card type. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getSecondaryTextColor()()` the color used for secondary label for the data card type. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getTimeColor()()` the color used for time for the card. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors#getTitleColor()()` the color used for title for the card. |

## Public constructors

### CardColors

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public CardColors(
    @NonNull LayoutColor backgroundColor,
    @NonNull LayoutColor titleColor,
    @NonNull LayoutColor contentColor,
    @NonNull LayoutColor timeColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryIconColor,
    @NonNull LayoutColor secondaryTextColor,
    ProgressIndicatorColors graphicProgressIndicatorColors,
    LayoutColor graphicIconColor
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor backgroundColor` | `https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` which is used to as the background color for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor titleColor` | the color used for title for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor contentColor` | the content color for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor timeColor` | the color used for time for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor` | the color used for label for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryIconColor` | the color used for icon in the data card type. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryTextColor` | the color used for secondary label for the data card type. |
| `https://developer.android.com/reference/androidx/wear/protolayout/material3/ProgressIndicatorColors graphicProgressIndicatorColors` | the color used for the progress indicator set as graphic of the card. If null, uses the default color defined in `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).circularProgressIndicator(kotlin.Float,androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.DimensionBuilders.ContainerDimension)` and `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).segmentedCircularProgressIndicator(kotlin.Int,kotlin.Float,androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.DimensionBuilders.ContainerDimension)`, which is `https://developer.android.com/reference/androidx/wear/protolayout/material3/CircularProgressIndicatorDefaults#(androidx.wear.protolayout.material3.MaterialScope).filledProgressIndicatorColors()`. |
| `https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor graphicIconColor` | the color used for the icon to be put at the center of the progress indicator to compose the graphic. If null, uses the default icon color, which is `https://developer.android.com/reference/androidx/wear/protolayout/material3/ColorScheme#primary()`. |

## Public methods

### copy

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull CardColors copy(
    @NonNull LayoutColor backgroundColor,
    @NonNull LayoutColor titleColor,
    @NonNull LayoutColor contentColor,
    @NonNull LayoutColor timeColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryIconColor,
    @NonNull LayoutColor secondaryTextColor,
    ProgressIndicatorColors graphicProgressIndicatorColors,
    LayoutColor graphicIconColor
)
```

Returns a copy of this `https://developer.android.com/reference/androidx/wear/protolayout/material3/CardColors`, optionally overriding some of the values.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor backgroundColor` | `https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` which is used to as the background color for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor titleColor` | the color used for title for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor contentColor` | the content color for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor timeColor` | the color used for time for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor` | the color used for label for the card. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryIconColor` | the color used for icon in the data card type. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryTextColor` | the color used for secondary label for the data card type. |
| `https://developer.android.com/reference/androidx/wear/protolayout/material3/ProgressIndicatorColors graphicProgressIndicatorColors` | the color used for the progress indicator set as graphic of the card. If null, uses the default color defined in `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).circularProgressIndicator(kotlin.Float,androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.DimensionBuilders.ContainerDimension)` and `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).segmentedCircularProgressIndicator(kotlin.Int,kotlin.Float,androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.DimensionBuilders.ContainerDimension)`, which is `https://developer.android.com/reference/androidx/wear/protolayout/material3/CircularProgressIndicatorDefaults#(androidx.wear.protolayout.material3.MaterialScope).filledProgressIndicatorColors()`. |
| `https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor graphicIconColor` | the color used for the icon to be put at the center of the progress indicator to compose the graphic. If null, uses the default icon color, which is `https://developer.android.com/reference/androidx/wear/protolayout/material3/ColorScheme#primary()`. |

### getBackgroundColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull LayoutColor getBackgroundColor()
```

`https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` which is used to as the background color for the card.

### getContentColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull LayoutColor getContentColor()
```

the content color for the card.

### getGraphicIconColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final LayoutColor getGraphicIconColor()
```

the color used for the icon to be put at the center of the progress indicator to compose the graphic. If null, uses the default icon color, which is `https://developer.android.com/reference/androidx/wear/protolayout/material3/ColorScheme#primary()`.

### getGraphicProgressIndicatorColors

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final ProgressIndicatorColors getGraphicProgressIndicatorColors()
```

the color used for the progress indicator set as graphic of the card. If null, uses the default color defined in `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).circularProgressIndicator(kotlin.Float,androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.DimensionBuilders.ContainerDimension)` and `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).segmentedCircularProgressIndicator(kotlin.Int,kotlin.Float,androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat,androidx.wear.protolayout.modifiers.LayoutModifier,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.wear.protolayout.material3.ProgressIndicatorColors,androidx.wear.protolayout.DimensionBuilders.ContainerDimension)`, which is `https://developer.android.com/reference/androidx/wear/protolayout/material3/CircularProgressIndicatorDefaults#(androidx.wear.protolayout.material3.MaterialScope).filledProgressIndicatorColors()`.

### getLabelColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull LayoutColor getLabelColor()
```

the color used for label for the card.

### getSecondaryIconColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull LayoutColor getSecondaryIconColor()
```

the color used for icon in the data card type.

### getSecondaryTextColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull LayoutColor getSecondaryTextColor()
```

the color used for secondary label for the data card type.

### getTimeColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull LayoutColor getTimeColor()
```

the color used for time for the card.

### getTitleColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public final @NonNull LayoutColor getTitleColor()
```

the color used for title for the card.