Hello. I was wondering if there is any way to manually set the Safari 15 tab color-theme color to my website. It seems like Safari automatically choose the color but I find out that this selection occurs during the first seconds of website load and, because of that, the color being choosen is not the right one for my website.
Is there any CSS I could add or a metatag that tells safari which color it should pick?
I know this is kinda a wierd request, but I want to provide my visitors the richest experience they could get.
Thank you.
Hi there.
You can set it manually with the meta tag:
<meta name="theme-color" content="#ecd96f">
You could even set different ones for light and dark theme if your website supports them:
<meta name="theme-color" content="#ecd96f" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0b3e05" media="(prefers-color-scheme: dark)">
If I'm not wrong, Safari chooses the theme color automatically from the background-color property.
Hope that helps 🙂