---
title: "SearchBarColors"
description: "Represents the colors used by a search bar.

See [SearchBarDefaults.colors] for the default implementation that follows Material
specifications."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

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


```kotlin
@ExperimentalMaterial3Api
class SearchBarColors(
    val containerColor: Color,
    val dividerColor: Color,
    val inputFieldColors: TextFieldColors,
)
```


Represents the colors used by a search bar.

See `SearchBarDefaults.colors` for the default implementation that follows Material
specifications.


## Secondary Constructors

```kotlin
constructor(
    containerColor: Color,
    dividerColor: Color,
) : this(containerColor, dividerColor, UnspecifiedTextFieldColors)
```

## Functions

```kotlin
fun copy(
        containerColor: Color = this.containerColor,
        dividerColor: Color = this.dividerColor,
        inputFieldColors: TextFieldColors = this.inputFieldColors,
    ) =
        SearchBarColors(
            containerColor = containerColor,
            dividerColor = dividerColor,
            inputFieldColors = inputFieldColors,
        )
```


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



