getColorByAttr

fun Context.getColorByAttr(@AttrRes attrRes: Int): Int

Returns the color value that the given attrRes refers to.

Throws

if the given attribute cannot be found.