Real-time color inversion based on the color underneath a text element

Question:

How can I achieve real-time color inversion of a text element based on the element underneath it?

Product:

Wix Studio

What have you already tried:

Additional information:

I am trying to recreate the effect seen on jomor.design’s homepage.

In the screenshot there’s Javascript code pasted in the global.css file. That wouldn’t work here.

While I don’t know exactly how to do this specific effect you definitely can with CSS.

Here’s some codepens demonstrating similar effects using only CSS that you can use for inspiration.