Browser Background color only mobile

Hi there

I put on readymag a Backgroundcolor to my website and sometimes the browser of the smartphone will adapt the color and sometimes not. I couldn’t find out in which cases the browser is changing the color, even support couldn’t give me a specific explanation on that.

So I decided to solve this problem with an code:

This code works perfekt and makes the browser in the color that I want, but at the moment on all devices (mobile, tablet, desktop).
Is there any way that this code is just working on the mobile version of my website that the rest (tablet, desktop) stays in standard like normal?

Thank you so much for any inputs.

you could also just place a colored shape element as background onto the desktop version but make it unvisible in tablet/mobile version.

Then you don´t have to deal with code…

Thank you so much, I guess “Background color” was not the right description. Sorry for that. I would like to change the color of the browser, where you can see all the different tabs. But just the browser color of the mobile version should change.

Any ideas?

allright. how is your code looking right now? pls share

This is the code which works:

But yea, just on all devices :slight_smile: I’m tryhing that this is working only on mobile device.

Thanks a lot for your help and time.

Seems not work, one more try with code:

meta name=“theme-color” content=“#9F52FA” media=“(prefers-color-scheme: light)”

meta name=“theme-color” content=“#9F52FA” media=“(prefers-color-scheme: dark)”

I had in mind, setting the browser theme-color is already only possible in mobile?

It might be possible that you have to set up a little js script to determine if the device is mobile and then change the meta name things to your desire.