<div class='sourceset sourceset-common'>Common</div>

```kotlin
object SnackbarDefaults
```

Object to hold defaults used by [Snackbar](/jetpack-compose/androidx.compose.material/material/components/Snackbar)

## Properties

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val backgroundColor: Color
```

Default background color of the [Snackbar](/jetpack-compose/androidx.compose.material/material/components/Snackbar)

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val primaryActionColor: Color
```

Provides a best-effort 'primary' color to be used as the primary color inside a [Snackbar](/jetpack-compose/androidx.compose.material/material/components/Snackbar).
Given that [Snackbar](/jetpack-compose/androidx.compose.material/material/components/Snackbar)s have an 'inverted' theme, i.e. in a light theme they appear dark, and
in a dark theme they appear light, just using [Colors.primary](/jetpack-compose/androidx.compose.material/material/classes/Colors) will not work, and has
incorrect contrast.

If your light theme has a corresponding dark theme, you should instead directly use
[Colors.primary](/jetpack-compose/androidx.compose.material/material/classes/Colors) from the dark theme when in a light theme, and use [Colors.primaryVariant](/jetpack-compose/androidx.compose.material/material/classes/Colors)
from the dark theme when in a dark theme.

When in a light theme, this function applies a color overlay to [Colors.primary](/jetpack-compose/androidx.compose.material/material/classes/Colors) from
[MaterialTheme.colors](/jetpack-compose/androidx.compose.material/material/objects/MaterialTheme) to attempt to reduce the contrast, and when in a dark theme this
function uses [Colors.primaryVariant](/jetpack-compose/androidx.compose.material/material/classes/Colors).