Yes , for some browsers this is already possible (e.g. Chrome and Firefox).
In particular, you need mix-blend-mode and CSS filters .
Here is a code showing Lenna as an example and a (compiled) copy of it as a code snippet:
.foo, .bar, .bar::after, .baz { width: 512px; height: 512px; position: absolute; } .foo { z-index: 1; mix-blend-mode: luminosity; opacity: 0; overflow: hidden; -webkit-filter: contrast(1.25); filter: contrast(1.25); } .foo:hover { opacity: 1; } .bar, .bar::after, .baz { background: url(https://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png); } .bar::after { content: ''; -webkit-filter: blur(4px) invert(1) contrast(0.75); filter: blur(4px) invert(1) contrast(0.75); mix-blend-mode: overlay; }
<div class="foo"> <div class="bar"></div> </div> <div class="baz"></div>
Hover over the image to see the effect. Adjusting the parameters (and possibly using opacity to โfade outโ the effect, similar to adjusting the โintensityโ of an unsharp mask) can help in obtaining more desirable results for specific use cases.
source share