> Documentation index: https://developer.android.com/reference/llms.txt

# DurationPickerDefaults

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/DurationPicker.kt+class:androidx.wear.compose.material3.DurationPickerDefaults) Added in [1.8.0-alpha04](https://developer.android.com/jetpack/androidx/releases/wear-compose.md.txt#1.8.0-alpha04)


```
object DurationPickerDefaults
```

<br />

*** ** * ** ***

Contains the default values used by `DurationPicker`.

## Summary

| ### Public functions |
|---|---|
| `DurationPickerColors` | `@Composable colors()` Creates a `DurationPickerColors` for a `DurationPicker`. |
| `DurationPickerColors` | `@Composable colors( selectedPickerContentColor: Color, unselectedPickerContentColor: Color, invalidPickerContentColor: Color, separatorColor: Color, pickerLabelColor: Color, confirmButtonContentColor: Color, confirmButtonContainerColor: Color, pickerBackgroundColor: Color )` Creates a `DurationPickerColors` for a `DurationPicker`. |
| `DurationPickerSelection` | `initialSelection(durationPickerType: DurationPickerType)` The default `DurationPickerSelection` for `DurationPicker` is set to the first available duration component based on the provided `DurationPickerType`. |

| ### Public properties |
|---|---|
| `DurationPickerType` | `type` The default `DurationPickerType` for `DurationPicker`. |

## Public functions

### colors

Added in [1.8.0-alpha04](https://developer.android.com/jetpack/androidx/releases/wear-compose.md.txt#1.8.0-alpha04)

```
@Composable
fun colors(): DurationPickerColors
```

Creates a `DurationPickerColors` for a `DurationPicker`.

### colors

Added in [1.8.0-alpha04](https://developer.android.com/jetpack/androidx/releases/wear-compose.md.txt#1.8.0-alpha04)

```
@Composable
fun colors(
    selectedPickerContentColor: Color = Color.Unspecified,
    unselectedPickerContentColor: Color = Color.Unspecified,
    invalidPickerContentColor: Color = Color.Unspecified,
    separatorColor: Color = Color.Unspecified,
    pickerLabelColor: Color = Color.Unspecified,
    confirmButtonContentColor: Color = Color.Unspecified,
    confirmButtonContainerColor: Color = Color.Unspecified,
    pickerBackgroundColor: Color = Color.Unspecified
): DurationPickerColors
```

Creates a `DurationPickerColors` for a `DurationPicker`.

| Parameters |
|---|---|
| `selectedPickerContentColor: Color = Color.Unspecified` | The content color of the selected picker. |
| `unselectedPickerContentColor: Color = Color.Unspecified` | The content color of unselected pickers. |
| `invalidPickerContentColor: Color = Color.Unspecified` | The content color of invalid picker options. |
| `separatorColor: Color = Color.Unspecified` | The color of separator between the pickers. |
| `pickerLabelColor: Color = Color.Unspecified` | The color of the picker label. |
| `confirmButtonContentColor: Color = Color.Unspecified` | The content color of the confirm button. |
| `confirmButtonContainerColor: Color = Color.Unspecified` | The container color of the confirm button. |
| `pickerBackgroundColor: Color = Color.Unspecified` | The background color of the picker, used for the top and bottom gradient fade on the picker columns. Defaults to `Color.Unspecified`, which makes the fade transparent, so it works on any background, including gradients and images. |

### initialSelection

Added in [1.8.0-alpha04](https://developer.android.com/jetpack/androidx/releases/wear-compose.md.txt#1.8.0-alpha04)

```
fun initialSelection(durationPickerType: DurationPickerType = this.type): DurationPickerSelection
```

The default `DurationPickerSelection` for `DurationPicker` is set to the first available duration component based on the provided `DurationPickerType`.

## Public properties

### type

```
val type: DurationPickerType
```

The default `DurationPickerType` for `DurationPicker`.