pydata-sphinx-theme
pydata-sphinx-theme copied to clipboard
Dark mode syntax highlighting isn't as color-blind friendly as the light mode
Some of the syntax highlighting in the dark mode switcher lacks the contrast present in the light mode. The best example I noticed was the json snippet on this page.
Original Images
The dark mode's green and orange lack contrast. The pink is harder to see as well.
The light mode has more contrast in this example.
Filtered Images
Here is the dark mode image with a green-weak filter to give an idea of what this may look like.
This is the dark mode image with a green-blind filter applied.
Idea or request for content:
No response
the dark theme color scheme used for the code highlighting comes from the available Pygments styling.
We are currently using tango
for the light theme and native
for the dark one. The user can still modify these in the conf.py
as mentioned in the doc.
If you have theme suggestions for the default dark Pygment theme we use let us know, that could be an interesting starting point (https://stylishthemes.github.io/Syntax-Themes/pygments/).
That being said it appears to me complicated to provide color-blindness support for the whole theme. The only website I know that provide such an option is GitHub with its 7 options for light and dark theme. admonitions and other component are clearly not color-blind friendly either.