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

Dark mode syntax highlighting isn't as color-blind friendly as the light mode #649

Closed
jakevandervaate opened this issue May 3, 2022 · 1 comment · Fixed by #985
Closed
Labels
needs: more information Needs more information from the author before we can move forward

Comments

@jakevandervaate
Copy link

jakevandervaate commented May 3, 2022

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.
Screenshot_20220428-082646

The light mode has more contrast in this example.
Screenshot_20220428-082708


Filtered Images

Here is the dark mode image with a green-weak filter to give an idea of what this may look like.
Screenshot_20220428-082646-green-weak

This is the dark mode image with a green-blind filter applied.
Screenshot_20220428-082646-green-blind

Idea or request for content:

No response

@12rambau
Copy link
Collaborator

12rambau commented May 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: more information Needs more information from the author before we can move forward
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants