# ColorProvider

# ColorProvider

Artifact:[androidx.glance:glance](https://developer.android.com/jetpack/androidx/releases/glance)  
[View Source](https://cs.android.com/search?q=file:androidx/glance/unit/ColorProvider.kt+class:androidx.glance.unit.ColorProvider)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

<br />

```
interface ColorProvider
```

<br />

*** ** * ** ***

Provider of colors for a glance composable's attributes.

## Summary

|                                    ### Public functions                                    |
|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color) | [getColor](https://developer.android.com/reference/kotlin/androidx/glance/unit/ColorProvider#getColor(android.content.Context))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`)` Returns the color the provider would use in the given[context](https://developer.android.com/reference/kotlin/androidx/glance/unit/ColorProvider#getColor(android.content.Context)). |

## Public functions

### getColor

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
fun getColor(context: Context): Color
```

Returns the color the provider would use in the given[context](https://developer.android.com/reference/kotlin/androidx/glance/unit/ColorProvider#getColor(android.content.Context)).