-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable font color #504
Comments
Thanks for the suggestion! Should we dissociate left / right? What should the parameter be named? We currently have |
Dissociation would be good. and of course, that would go for custom badges only. Tho I wouldn't mind what name it is as long as it's there. |
/cc @MattIPv4 |
@paulmelnikow ty, GH didn't bring this up in related. |
To be in line with the new naming, the parameters would now be |
My use case is using badges to link to GitHub labels, and wanting to use the same colours. GitHub labels automatically use white or black text colour based on the background colour: https://github.com/NaNoGenMo/2019/labels But the "admin" and "preview" badges are quite hard to read with white text: https://github.com/NaNoGenMo/2019 One option is to use a similar algorithm to GitHub's to select the foreground black/white colour, but I'd be happy enough to be able to select black for these two. |
@hugovk what you're suggesting has also been proposed in #4661. I'm personally more in favour of just having black and white automatically switching based on contrasts, rather than allowing full colour customisation as initially suggested by this issue. This keeps our badges more consistent and more readable (coloured text often being harder to read), without any user action needed to override the colour. |
There have been a number of issues and comments about font colours over the years. The most common reason given by users is to allow better readability when the badge uses a light background (#5317, #4661, #5455, #504 (comment) and probably others). This has been fixed by #5467 which automatically switches to a dark font when the background is too light. At this point in time, we don't think that allowing users to fully customise the font colour is a good idea. The reasoning as to why these new options may add complexity and work against Shields' consistency and readability promises can be found in #5467 (comment). Hopefully the implementation we've come up with will cover a vast majority of uses cases and allow people to happily read badges even with light backgrounds! 🎉 |
I'd like to be able to pick my own font color as well, instead of just picking badge color.
There are great color schemes that could be done like that.
The text was updated successfully, but these errors were encountered: