You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Site Logo: Dark transparent site logos are invisible #49501
When you upload an image to a Site Logo block the first time, a square crop of that image is used also as your Site Icon. This is likely going to be somewhat common for white sites with black text logo types, such as this:
In that situation, the site icon becomes barely visible:
Let's ensure that the site logo always has the site background applied, so that the color the logo has been designed to rely on is applied for contrast:
Can just apply the background color to the img directly.
It would be easy to add a white or light gray background, and that should do it, right?
What if we used the site's background color as the fallback? Probably would be better with the header template part's background even—though I'm not sure how possible that would be.
What if we used the site's background color as the fallback? Probably would be better with the header template part's background even—though I'm not sure how possible that would be.
Something that might be considered in conjunction with this is the contrast of the favicon when a browser is in dark mode. This was my test of using a logo like the one in the issue description (1st and 3rd tabs are my WordPress site, and yes I do tend to have too many tabs open):
I wonder if there are any good options for helping users avoid that, like a preview of an example browser tab in the block inspector.
You could argue that showing the dark icon being illegible in the admin should already be a hint that you could run into problems. I wonder if we could render a notice or something if you upload a logo with transparency and use it for the site icon.
It's worth noting access to the merged global styles data in the post editor is in the process of being added for other features such as section styling and displaying inherited style values in the UI.
Perhaps, waiting for that to land will make achieving consistency for the site logo in both editors easier?
Noting that this is an issue that WordPress.com Happiness Engomneers see reported while in support, as logos become invisible when the browsers are set to use dark mode.
Coming back to this one, it still feels relevant to show the site default background color behind the site logo as the simplest fix for this.
But one other option I wanted to mention is that if the black logo with a transparent background is inserted as an image, which it is in the site logo case, then using some simple filter CSS, we can add a stroke, as shown in this codepen.
Noting that unfortunately the fix I tried above was not a good fix. A useful report clarified that indeed the best solution si to apply the site background color.
I'm going to tentatively close this one out, now that the adminbar is always present as a home for the site logo. Please reopen this issue, if my closing here is a mistake, or I lack nuance.
Activity
courtneyr-dev commentedon Mar 31, 2023
Possibly related? https://wordpress.org/support/topic/gutenberg-dosent-work/
jasmussen commentedon Mar 31, 2023
Seems likely, yes. One idea, add a circular dot behind any image, so there's always going to be something visible at least.
richtabor commentedon Mar 31, 2023
What if we used the site's background color as the fallback? Probably would be better with the header template part's background even—though I'm not sure how possible that would be.
jasmussen commentedon Apr 10, 2023
That seems like it would be a great solution.
mtias commentedon May 1, 2023
+1 for using the background of the site, in the same way the global styles card is created.
talldan commentedon May 3, 2023
Something that might be considered in conjunction with this is the contrast of the favicon when a browser is in dark mode. This was my test of using a logo like the one in the issue description (1st and 3rd tabs are my WordPress site, and yes I do tend to have too many tabs open):

I wonder if there are any good options for helping users avoid that, like a preview of an example browser tab in the block inspector.
mtias commentedon May 3, 2023
You could argue that showing the dark icon being illegible in the admin should already be a hint that you could run into problems. I wonder if we could render a notice or something if you upload a logo with transparency and use it for the site icon.
9 remaining items
aaronrobertshaw commentedon May 5, 2024
It's worth noting access to the merged global styles data in the post editor is in the process of being added for other features such as section styling and displaying inherited style values in the UI.
Perhaps, waiting for that to land will make achieving consistency for the site logo in both editors easier?
filipanoscampos commentedon Jan 22, 2025
Noting that this is an issue that WordPress.com Happiness Engomneers see reported while in support, as logos become invisible when the browsers are set to use dark mode.
Mayank-Tripathi32 commentedon Mar 25, 2025
I am working on the PR to implement the discussed solution
jasmussen commentedon Dec 8, 2025
Coming back to this one, it still feels relevant to show the site default background color behind the site logo as the simplest fix for this.
But one other option I wanted to mention is that if the black logo with a transparent background is inserted as an image, which it is in the site logo case, then using some simple filter CSS, we can add a stroke, as shown in this codepen.
Until such a time as the actual global styles background color value can easily be used here, this might be a holdover solution.
jasmussen commentedon Dec 8, 2025
Trying a fix here #73816
jasmussen commentedon Dec 28, 2025
Noting that unfortunately the fix I tried above was not a good fix. A useful report clarified that indeed the best solution si to apply the site background color.
Mayank-Tripathi32 commentedon Dec 28, 2025
Could we move forward with previous approach in that case? #69693
jasmussen commentedon Dec 29, 2025
Yes, that is the most promising path forward. I expanded the ping range.
jasmussen commentedon Aug 7, 2026
I'm going to tentatively close this one out, now that the adminbar is always present as a home for the site logo. Please reopen this issue, if my closing here is a mistake, or I lack nuance.