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

Support more PyData theme colors for badges #215

Open
user27182 opened this issue Aug 8, 2024 · 1 comment
Open

Support more PyData theme colors for badges #215

user27182 opened this issue Aug 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@user27182
Copy link
Contributor

Context

I have found that the existing dark and light colors have low-contrast when viewing a site with the dark and light themes applied, respectively, and are therefore hard to see/read. E.g. see this badge :

image
from pyvista/pyvista#6475.

I went looking for an alternative, but found that dark and light are the only grayscale options with outlines supported by Sphinx Design: https://sphinx-design.readthedocs.io/en/latest/badges_buttons.html

Proposal

Additional colors are available from the PyData theme:
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/styling.html#color-variables

Something like the surface and on-surface colors might be good alternatives since these change with the theme.

Perhaps all the other PyData theme colors could be supported as well.

Tasks and updates

No response

@user27182 user27182 added the enhancement New feature or request label Aug 8, 2024
@user27182
Copy link
Contributor Author

Looks like there are three undocumented colors: muted, black, and white

SEMANTIC_COLORS = (
"primary",
"secondary",
"success",
"info",
"warning",
"danger",
"light",
"muted",
"dark",
"white",
"black",
)

Here's what all the colors look like (including undocumented ones) with the light and dark PyData theme applied:
image

Based on this it looks like muted produces the best results for what I'm looking for, as the outline version is clearly visible with either the dark or light theme.

So, at the very least, this issue is a documentation issue. It would be good to update the docs to include the three undocumented colors muted, black, and white.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant