laggingreflex laggingreflex - 3 months ago 11
CSS Question

Invert colors of an image in CSS or JavaScript

How do I invert colors of an image (jpg/png..) in either css if possible or javascript?

Previous related questions don't give enough detail.


CSS3 has a new filter attribute which will only work in webkit browsers supported in webkit browsers and in Firefox. It does not have support in IE or Opera mini:

img {
   -webkit-filter: invert(1);
   filter: invert(1);
<img src="">