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


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



<h2 id="colorresource-id">colorResource</h2>

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


```kotlin
@Composable
@ReadOnlyComposable
fun colorResource(@ColorRes id: Int): Color
```


Load a color resource.

#### Parameters

| | |
| --- | --- |
| id | the resource identifier |


#### Returns

| | |
| --- | --- |
|  | the color associated with the resource |