Android Question Is the Background light or dark

TheRealMatze

Active Member
Licensed User
Hi,
i want to set the color of some text based on the current background-color. So, if the background is dark the text should by white, if the background is light it should be black.
The background-color is stored as text in a database and converted with hex2color.

Does anyone has already a function for that or a better idea than splitting the hex and validating the 3 colors?

Regards
Matthias
 
Top