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
The color of the Java logo is 007396. The logo on this badge is white instead of its intended color. We can see this by changing the badge’s color: https://img.shields.io/badge/-Java-000?&logo=Java
It is by design, but I agree the behaviour is not ideal in this situation.
The default behaviour is that we try to select a logo colour that will work with the default backgrounds. If we think the suggested colour from simpleicons will work, we use that otherwise we re-colour it so that we don't end up showing a dark logo on a dark background or light logo on a light background. This is useful for the common case.
For the main badge styles (flat, flat-square, for-the-badge, plastic) we're assuming the background is going to be darkgrey and for the social badge we're assuming it is whitesmoke. If you've customised the background colour, then we don't adapt. Unfortunately in this case, because you've customised the background of the default badge style to a light colour, this means the logic is basically doing the exact opposite of what you want.
#2833 is the PR where we introduced this. The logic might have moved on a bit since then, but if you read the discussion there, that's how we arrived at the current tradeoff..
Are you experiencing an issue with...
Description
The color for Simple Icons seems to be inconsistent in its application. For some badges, I need to specify the
logoColor
and for other I dont.Working examples
simpleicons.org/swift
https://img.shields.io/badge/-Swift-fff?&logo=Swift
The color of the Swift logo is
FA7343
and it seems to be applied correctly without needing to specify thelogoColor
.simpleicons.org/docker
https://img.shields.io/badge/-Docker-fff?&logo=Docker
Again, I didn’t have to specify the
logoColor
for the logo to show up correctly.Non-working examples
simpleicons.org/java
https://img.shields.io/badge/-Java-fff?&logo=Java
The color of the Java logo is
007396
. The logo on this badge is white instead of its intended color. We can see this by changing the badge’s color:https://img.shields.io/badge/-Java-000?&logo=Java
So to get the Java logo to show up correctly i have to specify the
logoColor
:https://img.shields.io/badge/-Java-fff?&logo=Java&logoColor=007396
simpleicons.org/typescript
Logo without
logoColor
:https://img.shields.io/badge/-TypeScript-fff?&logo=TypeScript
Logo with
logoColor
:https://img.shields.io/badge/-TypeScript-fff?&logo=TypeScript&logoColor=007ACC
I’m unsure if this is a bug or if it is by design. Why do I have to specify the
logoColor
for some logos, and for others I do not?The text was updated successfully, but these errors were encountered: