Composable Function

colorResource

Load a color resource.

colorResource

Source set: Android
@Composable
public fun colorResource(@ColorRes id: Int): Color

Load a color resource.

Parameters

id the resource identifier

Return

the color associated with the resource

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: