I want to change black color to red but when I set...
# compose
i
I want to change black color to red but when I set tint also purple element goes to red. Is it possible to change only black elements? That image is vector .xml
Copy code
Image(
    painter = painterResource(id = R.drawable.wifi),
    contentDescription = "",
    colorFilter = ColorFilter.tint(Color.Red)
)
c
You should break it into two separate images, and tint them individually. You cannot apply the tint partially to one image.
👍 1
d
Or look into the XML, you could be able to change the color directly inside it. You can't do it from code because that's considered a complete image (sort of like a blackbox) tint only use alpha channel and color what's visibile
❤️ 1
i
Ok, thank you guys!