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
Improve labels coloring and displaying in dark mode #901
Comments
Thanks @xplosionmind yeah we have a better algorithm on iOS that takes into account the colour + the mode. I noticed GitHub does this too, where it will sometimes invert the text colour. |
Do we have predefined colors based on different themes? Is there a mapping of colors according to theme? |
@rupin90 right now we don't the colour can be user specified, but on iOS I believe @satindar has an algorithm for determining what the font colour should be based on the label colour and the them. You can kind of see how GitHub does this too, but changing themes and seeing how the labels are rendered. |
On iOS we calculate the Luminance value and if it's less than 0.5 we consider it a dark color and use a white text color. This seems like the way to calculate the same with JS: |
Wow, thank you 🙏 |
@jacksonh - Yeah true. What I understood is
|
Final outcome to implement
|
Do we already have a way to set the background color? - this is for the light theme. |
@rupin90 I think for light theme its just as simple as setting the background color to the label color. |
Duplicated here: #555 -- will close that one out. |
I am closing this issue since the PR is merged. |
Labels should be readable regardless of the color and of the theme. In this screenshot, it appears that, for example, that blue labels are not well readable in dark mode.
The text was updated successfully, but these errors were encountered: