Reputation: 45
I'm looking for a way to invert the color of text depending on the video color I have in background. I din't find any way to make it without constant color value which is necessary because the color behind the text is never the same.
I already tried things using mix-blend-mode
and changing the text color but of course in vain :
.my-text {
color: black;
mix-blend-mode: difference
}
This just get me the text in black.
I also tried filter: invert(1);
but it just got me the text in black as it doesn't take count of the background.
Upvotes: 0
Views: 1711
Reputation: 130
Try replacing color: black
with color: white
:
Big credit to the original codepen.
Upvotes: 2