How to automatically switch text color based on background's brightness
Marco Poletto
Posted on June 26, 2019
Here a quick example of how you can programmatically change text color, for example of a button, based on the element's background color.
The function take in account the brightness of the background and switch automatically text color.
💖 💪 🙅 🚩
Marco Poletto
Posted on June 26, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.