There are ideas how to change the color of a fixed button if the background is white and black. For example, there is a share button of white color fixed, but the background is constantly changing when scrolling, let's say the button is visible in contrast, but if the background is white, the button merges, if you can track the color, then if the button intersects with the dark color, make it lighter, it doesn't matter if it is filling the background or gradient. Fiddle Example Maybe use mix-blend-mode: difference; somehow mix-blend-mode: difference;

1 answer 1

Add the mix-blend-mode: difference; property mix-blend-mode: difference; to the object.