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

role badge color unreadible #2775

Open
wakest opened this issue Apr 6, 2024 · 3 comments
Open

role badge color unreadible #2775

wakest opened this issue Apr 6, 2024 · 3 comments
Labels
c: bug Something isn't working c: ui Enhancing UI s: accepted Accepted feature / Confirmed bug

Comments

@wakest
Copy link

wakest commented Apr 6, 2024

on Elk the role badge text is showing up almost unreadable when 'color' is set to black in mastodon's admin settings
image

heres what it looks like on Mastodon
image

this is set in mastodon's admin page at instance.tld/admin/roles/
image

the role badge looks quite good when the color is set to something that works with the theme:
image

@wakest wakest added c: bug Something isn't working s: pending triage Pending Triage labels Apr 6, 2024
Copy link

stackblitz bot commented Apr 6, 2024

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@shuuji3 shuuji3 added the c: ui Enhancing UI label Apr 7, 2024
@shuuji3 shuuji3 added s: accepted Accepted feature / Confirmed bug and removed s: pending triage Pending Triage labels Apr 19, 2024
@shuuji3
Copy link
Member

shuuji3 commented Apr 19, 2024

I can confirm this issue. Mastodon can specify arbitrary colors. So maybe Elk needs to use the fixed color (like the theme color) instead of the given custom color like Mastodon UI.

image

image

There might be a way to choose a good color dynamically from the specified color. For example, choose a color that has enough contrast to both the custom color and the color mode (dark/light)? But I don't have any idea to do so for now.

@shuuji3
Copy link
Member

shuuji3 commented Apr 19, 2024

Leonardo: an open source contrast-based color generator | by Nate Baldwin | Medium - https://medium.com/@NateBaldwin/leonardo-an-open-source-contrast-based-color-generator-92d61b6521d2

This might be a potential solution but I think it's too complicated just for the badge color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working c: ui Enhancing UI s: accepted Accepted feature / Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants