If I have a vector image resource which has 3 colo...
# compose
d
If I have a vector image resource which has 3 colors, can I somehow replace each of those? Perhaps by constructing some smart
ColorFilter
?
Copy code
Image(
  painter = painterResource(R.drawable.multi_color_image),
  colorFilter = buildColorMatrix(
    replacements = mapOf(Color.White to Color.Red, Color.Black to Color.Blue)
  )
)

fun buildColorMatrix(replacements: Map<Color, Color): ColorMatrix {
  // ???
}
My color-space-fu is not strong enough. Or not possible?
z
Does this help?
d
Nice! I will study it, thanks