CSS Question - black or white text color based on background
Hey guys,
I'd like to have my text colored based on the background color. I found a way to do it on the CSS tricks website, but it's using a
mix-blend-mode
- they say it's not well supported and it also does not work with only black / white coloring.
Is there a pretty convenient way to do it in CSS (maybe Tailwind) / JS (I'm using React)?
The screenshot shows what I have right now (I want the black text on the red-ish background to be white)3 Replies