---
title: "TimeInputColors"
description: "Represents the colors used by a [TimeInput] in different states."
type: "class"
lastmod: "2026-08-27"
---
## API Reference

> Source set: Common

```kotlin
public class TimeInputColors public constructor(
    /** The container color of the time input. */
    public val containerColor: Color,
    /** The color used for the border of the AM/PM toggle. */
    public val periodSelectorBorderColor: Color,
    /** The color used for the selected container of the AM/PM toggle. */
    public val periodSelectorSelectedContainerColor: Color,
    /** The color used for the container of the AM/PM toggle. */
    public val periodSelectorContainerColor: Color,
    /** The color used for the selected content of the AM/PM toggle. */
    public val periodSelectorSelectedContentColor: Color,
    /** The color used for the content of the AM/PM toggle. */
    public val periodSelectorContentColor: Color,
    /** The [TextFieldColors] used for the hour and minute text fields. */
    public val timeTextFieldColors: TextFieldColors,
)
```

Represents the colors used by a [TimeInput](/jetpack-compose/androidx.compose.material3/material3/components/TimeInput/api) in different states.

#### Parameters

| | |
| --- | --- |
| containerColor | the container color of the time input |
| periodSelectorBorderColor | the color used for the border of the AM/PM toggle |
| periodSelectorSelectedContainerColor | the color used for the selected container of the AM/PM toggle |
| periodSelectorContainerColor | the color used for the container of the AM/PM toggle |
| periodSelectorSelectedContentColor | color used for the selected content of the AM/PM toggle |
| periodSelectorContentColor | color used for the content of the AM/PM toggle |
| timeTextFieldColors | the [TextFieldColors](/jetpack-compose/androidx.compose.material3/material3/classes/TextFieldColors) used for the hour and minute text fields |

## Functions

### copy

> Source set: Common

```kotlin
public fun copy(
        containerColor: Color = this.containerColor,
        periodSelectorBorderColor: Color = this.periodSelectorBorderColor,
        periodSelectorSelectedContainerColor: Color = this.periodSelectorSelectedContainerColor,
        periodSelectorContainerColor: Color = this.periodSelectorContainerColor,
        periodSelectorSelectedContentColor: Color = this.periodSelectorSelectedContentColor,
        periodSelectorContentColor: Color = this.periodSelectorContentColor,
        timeTextFieldColors: TextFieldColors? = this.timeTextFieldColors,
    ): TimeInputColors
```

Returns a copy of this TimeInputColors, optionally overriding some of the values.

#### Parameters

| | |
| --- | --- |
| containerColor | the container color of the time input |
| periodSelectorBorderColor | the color used for the border of the AM/PM toggle |
| periodSelectorSelectedContainerColor | the color used for the selected container of the AM/PM toggle |
| periodSelectorContainerColor | the color used for the container of the AM/PM toggle |
| periodSelectorSelectedContentColor | color used for the selected content of the AM/PM toggle |
| periodSelectorContentColor | color used for the content of the AM/PM toggle |
| timeTextFieldColors | the [TextFieldColors](/jetpack-compose/androidx.compose.material3/material3/classes/TextFieldColors) used for the hour and minute text fields |

#### Return

a copy of this [TimeInputColors](/jetpack-compose/androidx.compose.material3/material3/classes/TimeInputColors)

### equals

> Source set: Common

```kotlin
override fun equals(other: Any?): Boolean
```

### hashCode

> Source set: Common

```kotlin
override fun hashCode(): Int
```
