colorAttr

inline fun ComponentContext.colorAttr(@AttrRes id: Int, @ColorRes defResId: Int = 0): Int

Return a ColorInt value, corresponding to an attribute resource ID. If given attribute ID can not be found, default color resource ID defResId is used.