getColorCompat

fun Context.getColorCompat(@ColorRes id: Int): Int

Get a color from the resources based on their ID using ResourcesCompat.getColor()