You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
Here's what all the colors look like (including undocumented ones) with the light and dark PyData theme applied:
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.
Thanks for the investigation! The undocumented muted, white and black colours you found are now documented (#216). For colours that adapt to a theme's light/dark mode, every semantic colour is a CSS variable (--sd-color-dark, --sd-color-dark-text, ... see the CSS variables page), so you can map them to PyData's palette in a custom stylesheet, e.g. under html[data-theme="dark"] { --sd-color-dark: var(--pst-color-on-surface); }. Building theme-specific palettes into sphinx-design is out of scope, so I'm closing this as fixed by the docs update.
Activity
user27182 commentedon Aug 8, 2024
Looks like there are three undocumented colors:
muted,black, andwhitesphinx-design/sphinx_design/shared.py
Lines 19 to 31 in 0b178a9
Here's what all the colors look like (including undocumented ones) with the light and dark PyData theme applied:

Based on this it looks like
mutedproduces the best results for what I'm looking for, as theoutlineversion 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, andwhite.chrisjsewell commentedon Nov 10, 2026
Thanks for the investigation! The undocumented
muted,whiteandblackcolours you found are now documented (#216). For colours that adapt to a theme's light/dark mode, every semantic colour is a CSS variable (--sd-color-dark,--sd-color-dark-text, ... see the CSS variables page), so you can map them to PyData's palette in a custom stylesheet, e.g. underhtml[data-theme="dark"] { --sd-color-dark: var(--pst-color-on-surface); }. Building theme-specific palettes into sphinx-design is out of scope, so I'm closing this as fixed by the docs update.