
FlipFromBlacktoWhiteBasedonBackgroundColor
17 Feb 2024
I found myself with the need to toggle between black & white for text color based on whether the background-color of the element was darker or lighter. I didn't know if it could be done, but after just 5 minutes of research, I think I came up with an answer.