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

```kotlin
public object CardDefaults
```

Contains the default values used by [Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card)

## Functions

```kotlin
@Composable public fun cardColors(): CardColors
```

Creates a [CardColors](/jetpack-compose/androidx.wear.compose/compose-material3/classes/CardColors) that represents the default container and content colors used in a
[Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card), [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) or [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard).

<h2 id="cardcolors-containercolor-contentcolor-appnamecolor-timecolor-titlecolor-subtitlecolor">cardColors</h2>

```kotlin
@Composable
public fun cardColors(
    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
```

Creates a [CardColors](/jetpack-compose/androidx.wear.compose/compose-material3/classes/CardColors) that represents the default container and content colors used in a
[Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card), [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) or [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard).

#### Parameters

| | |
| --- | --- |
| containerColor | the container color of this [Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card). |
| contentColor | the content color of this [Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card). |
| appNameColor | the color used for appName, only applies to [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard). |
| timeColor | the color used for time, applies to [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) and [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard). |
| titleColor | the color used for title, applies to [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) and [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard). |
| subtitleColor | the color used for subtitle, applies to [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard). |

<hr class="docs-overload-divider">

<h2 id="outlinedcardcolors">outlinedCardColors</h2>

```kotlin
@Composable
public fun outlinedCardColors(): CardColors
```

Creates a [CardColors](/jetpack-compose/androidx.wear.compose/compose-material3/classes/CardColors) that represents the default container and content colors used in an
[OutlinedCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/OutlinedCard), outlined [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) or [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard).

<hr class="docs-overload-divider">

<h2 id="outlinedcardcolors-contentcolor-appnamecolor-timecolor-titlecolor-subtitlecolor">outlinedCardColors</h2>

```kotlin
@Composable
public fun outlinedCardColors(
    contentColor: Color = Color.Unspecified,
    appNameColor: Color = Color.Unspecified,
    timeColor: Color = Color.Unspecified,
    titleColor: Color = Color.Unspecified,
    subtitleColor: Color = Color.Unspecified,
): CardColors
```

Creates a [CardColors](/jetpack-compose/androidx.wear.compose/compose-material3/classes/CardColors) that represents the default container and content colors used in an
[OutlinedCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/OutlinedCard), outlined [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) or [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard).

#### Parameters

| | |
| --- | --- |
| contentColor | the content color of this [OutlinedCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/OutlinedCard). |
| appNameColor | the color used for appName, only applies to [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard). |
| timeColor | the color used for time, applies to [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) and [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard). |
| titleColor | the color used for title, applies to [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard) and [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard). |
| subtitleColor | the color used for subtitle, applies to [TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard). |

<hr class="docs-overload-divider">

<h2 id="cardwithcontainerpaintercolors">cardWithContainerPainterColors</h2>

```kotlin
@Composable
public fun cardWithContainerPainterColors(): CardColors
```

Creates a [CardColors](/jetpack-compose/androidx.wear.compose/compose-material3/classes/CardColors) that represents the default container and content colors used in a
[Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card) with image container painter.

<hr class="docs-overload-divider">

<h2 id="cardwithcontainerpaintercolors-contentcolor-appnamecolor-timecolor-titlecolor-subtitlecolor">cardWithContainerPainterColors</h2>

```kotlin
@Composable
public fun cardWithContainerPainterColors(
    contentColor: Color = Color.Unspecified,
    appNameColor: Color = Color.Unspecified,
    timeColor: Color = Color.Unspecified,
    titleColor: Color = Color.Unspecified,
    subtitleColor: Color = Color.Unspecified,
): CardColors
```

Creates a [CardColors](/jetpack-compose/androidx.wear.compose/compose-material3/classes/CardColors) that represents the default container and content colors used in a
[TitleCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/TitleCard) with Image set as a background.

#### Parameters

| | |
| --- | --- |
| contentColor | the content color of this [Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card). |
| appNameColor | the color used for appName, only applies to [AppCard](/jetpack-compose/androidx.wear.compose/compose-material3/components/AppCard). |
| timeColor | the color used for time. |
| titleColor | the color used for title. |
| subtitleColor | the color used for subtitle. |

<hr class="docs-overload-divider">

<h2 id="containerpainter-image-scrim-sizetointrinsics-alignment-contentscale-alpha">containerPainter</h2>

```kotlin
@Composable
public fun containerPainter(
    image: Painter,
    scrim: Brush = scrimBrush(),
    sizeToIntrinsics: Boolean = false,
    alignment: Alignment = Alignment.Center,
    contentScale: ContentScale = ContentScale.Fit,
    alpha: Float = DefaultAlpha,
): Painter
```

Creates a [Painter](/jetpack-compose/androidx.compose.ui/ui-graphics/classes/Painter) for the background of an [Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card) that displays an image with a scrim on
top to make sure that any content above the background will be legible.

An Image background is a means to reinforce the meaning of information in a Card, e.g. to
help to contextualize the information. Cards should have a content color that contrasts with
the background image and scrim.

#### Parameters

| | |
| --- | --- |
| image | The [Painter](/jetpack-compose/androidx.compose.ui/ui-graphics/classes/Painter) to use to draw the container background of the [Card](/jetpack-compose/androidx.wear.compose/compose-material3/components/Card) |
| scrim | The [Brush](/jetpack-compose/androidx.compose.ui/ui-graphics/classes/Brush) to use to paint a scrim over the container image to ensure that any text drawn over the image is legible |
| sizeToIntrinsics | When false (the default), fills the available space within the container. Pass true to retain the size of the image. |
| alignment | Specifies alignment of the container image painter relative to the container. |
| contentScale | Strategy for scaling the painter if its size does not match the container. |
| alpha | Opacity of the container image painter and scrim. |

<hr class="docs-overload-divider">

<h2 id="scrimbrush">scrimBrush</h2>

```kotlin
@Composable
public fun scrimBrush(): Brush
```

Creates a [Brush](/jetpack-compose/androidx.compose.ui/ui-graphics/classes/Brush) for the recommended scrim drawn on top of image container backgrounds.

<hr class="docs-overload-divider">

<h2 id="outlinedcardborder-outlinecolor-borderwidth">outlinedCardBorder</h2>

```kotlin
@Composable
public fun outlinedCardBorder(
    outlineColor: Color = OutlinedCardTokens.ContainerBorderColor.value,
    borderWidth: Dp = OutlinedCardTokens.BorderWidth,
): BorderStroke
```

Creates a [BorderStroke](/jetpack-compose/androidx.compose.foundation/foundation/classes/BorderStroke) that represents the default border used in Outlined Cards.

#### Parameters

| | |
| --- | --- |
| outlineColor | The color to be used for drawing an outline. |
| borderWidth | width of the border in [Dp](/jetpack-compose/androidx.compose.ui/ui-unit/classes/Dp). |