Skip to content
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

Automatically use dark text based on color #3015

Closed
mbarkhau opened this issue Feb 17, 2019 · 3 comments
Closed

Automatically use dark text based on color #3015

mbarkhau opened this issue Feb 17, 2019 · 3 comments
Labels
core Server, BaseService, GitHub auth, Shared helpers

Comments

@mbarkhau
Copy link
Contributor

With the currently hard-coded white text I think most badges pick a darker colours so that there is enough contrast to the text.

image
image

We could do something similar that was done for #2431 wrt. logos, choosing black or white text based on a luminance calculation for the background colour.

Perhaps part of the role of the shadow is to give the text at least some very faint outline in the case of a light background. If so, maybe it should be removed or changed in the case of black text.

@mbarkhau
Copy link
Contributor Author

A concern with this is of course that it can change the rendering of existing badges (hopefully for the better), so it would be good to be able to see the impact on existing badges doing this.

@paulmelnikow
Copy link
Member

I'd lean against automatically choosing a light color for uniformity's sake, though we could implement #504 to make this possible for people who really need to use light colors and want dark text.

@paulmelnikow paulmelnikow added the core Server, BaseService, GitHub auth, Shared helpers label Feb 18, 2019
@mbarkhau
Copy link
Contributor Author

Ok, closing this in favour of #504.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Server, BaseService, GitHub auth, Shared helpers
Projects
None yet
Development

No branches or pull requests

2 participants