Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • My question isn't about how to avoid filtering an image, but to revert the filter already applied to a block, only on some elements of this block. The .filter HAS the filter: invert() rule already applied. I need to revert this for some elements inside.
    – Zenoo
    Commented Feb 13, 2018 at 13:35
  • 1
    As pointed out, it's isn't possible to undo the invert. The closest I can imagine is using a series of other filters to get the image colors somewhat back to their initial, but it will be imprecise. For example, some combination of saturate, invert, etc. Commented Feb 13, 2018 at 13:37
  • No, the .filter class has to have the filter applied to it directly, since the DOM inside it is very complex, applying the invert on .filter * would screw up everything. If what @TemaniAfif said was correct, there must be a combination of other filters which would render as the initial image exactly.
    – Zenoo
    Commented Feb 13, 2018 at 13:40
  • "applying the invert on .filter * would screw up everything" - why? Commented Feb 13, 2018 at 13:42
  • 1
    Thanks for the approximation ! Is there any way to find the exact math behind all this? I'll go for your answer if there isn't, but I'd really like an exact match.
    – Zenoo
    Commented Feb 13, 2018 at 16:13