I have two different divs, one on top of the other.
<div id="upper" style="background-color:transparent;z-index:2
width:15px;height:15px;
position:absolute;
top:0px;left:0px;
filter:invert(100%)"></div>
<div id="lower" style="background-color:#ff9900;z-index:1
width:100%;height:100px;
position:absolute;
top:0px;left:0px"></div>
The lower div can change color during time, the upper dive must get the lower color but inverted!
It seems easy but consider this condition: the upper div does not know what it has below itself, it can be more divs for example. In the scenario I wrote, I just made it easy, but I cannot select a particular element and get its color.
How to do?
In the example you saw I used filter:invert(100%)
as I thought it could be the solution.