Invert Text over dark background

Hi guys, I just wanted to ask if its possible to invert my fixed menu text color when I scroll down and it intersects with an dark background or picture. I made an example on how it should look like in the end
thanks so much!

Hi :raised_hand_with_fingers_splayed:

This cannot be achieved using the regular text element, you can create a custom element with a module on GitHub .

hey :slight_smile: thanks for your answer! Ok that looks like black magic coding haha

Indeed it is, you’re welcome :blush:

@ahmadnasriya Hi, I’m new to coding on Wix. How do I go about adding this code to my six site, do I just copy and paste it in Dev Mode or do I need to do more?

I’m also struggling with this, I tried copy pasting the java code into the ā€˜masterPage.js’ but I don’t know how to tell the code what text element to use. I know nothing about coding :confused:

Hello. Is there any solution to this as I also am requiring it.

Thank You

Hi Ahmad,
I also am having issues as I know nothing about code. How do we implement this into our wix element?
Thank You!

I also want the answer for this. Can anyone explain step by step?
My hearder is a svg logo file, a text box and a wix menu.

This is probably using a blend mode of some type - you’ll likely want to use some CSS in Wix Studio.

It’d probably look something similar to:

.rich-text__text {
   color: white; /* Set the initial text color to white */
    mix-blend-mode: difference; /* Use difference blend mode */
} 

The result would like like the following:
Screenshot 2024-07-23 at 16.27.42

And you can learn more about using CSS here - Studio Editor: About CSS Editing | Help Center | Wix.com

mix-blend-mode: difference works by inverting the background color where the text is placed, resulting in the text color dynamically adjusting based on the background. On light backgrounds, the text will appear darker (closer to black), and on dark backgrounds, it will appear lighter (closer to white).

It’s also worth checking against different colours.


I also hear there might be some features coming up that’ll assist with this :wink:

1 Like

Okay thanks! but where am I putting this code?

Into velo code? embed? Wix IDE? html, css, global.css, javescript, developer mode, ā€œcodeā€, iFrame, embed site, custom element, masterpage.sj, css classes ???

I hope the new feature + an easier way to manoeuvre code is around the corner asap! :see_no_evil: Im drowning in confusion atm

This would be put in as a custom css class. This link will help learn more

1 Like

This explained a lot! Thanks!
I guess the classes does not support blend-mode for pinned components just yet?
Do you guys have a release date for this feature?