colors. in XML android:tint – API level 21 android:drawableTint – API level 23 var ImageView.tint: Int? get() = 0 set(color) { color?.let { ImageViewCompat.setImageTintList(this, ColorStateList.valueOf(it)) } ?: run { ImageViewCompat.setImageTintList(this, null) } } var Drawable.tint: Int? get() = 0 set(color) { color?.let { DrawableCompat.setTint(this, color) } ?: run { DrawableCompat.setTintList(this, null) } } private fun initIntention() { viewModel.selectedIntention.observe(this@Fragment, Observer { intention -> intentionTextView.text = getString(intention.text) intentionTextView.setTextColor(intention.textColor) intentionImageView.tint = intention.arrowColor }) }