Strings

Used to access colors from an applications resources

View in Playground

Accessing a color resource

Using the colorResource function, a single color resource can be accessed.

<color name="colorPrimary">#6200EE</color>

Text(text = stringResource(id = R.string.app_name),
    color = colorResource(id = R.color.colorPrimary))