I am working on an Android Application. I have a cardView in which there is an image and TextView. I want the color of this textView to be best suited with image
Asked
Active
Viewed 86 times
1
-
1The solution is check color of image, when you determined the color of image, you need to the text color that has a contrast that matches the color of the image. You can refer the same question at [here](https://stackoverflow.com/questions/42420286/android-how-to-change-text-color-according-to-background-image) or [here](https://stackoverflow.com/questions/38216167/how-can-i-change-the-color-of-my-text-based-on-the-color-of-the-imageview-it-ove) – Trung Đoan Jan 13 '21 at 05:53
1 Answers
1
Image color may not be consistent. So if you want to put a text over it, it is advisable to put the text on a background. Look at the image below and the text at it's left bottom. I put it on a background so it can standout on any image while making sure the background is transparent enough for the image underneath it to show

Junior
- 1,007
- 4
- 16
- 26