---
title: "ColorProvider"
description: "Returns a [ColorProvider] that always resolves to the [Color]."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun ColorProvider(color: Color): ColorProvider
```


Returns a `ColorProvider` that always resolves to the `Color`.



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


```kotlin
public fun ColorProvider(day: Color, night: Color): ColorProvider
```


Returns a `ColorProvider` that provides `day` when night mode is off, and `night` when night mode
is on.



