rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

Improve web accessibility for theme base16 comments #1952

Open designbymimmi opened 1 year ago

designbymimmi commented 1 year ago

Context

Increase color vs background color contrast in base16 theme to make it easier to read comments.

Screenshots using theme base16.dark

Before #505050 After #858585
comment-color-BEFORE-#505050 comment-color-AFTER-#858585

Web accessibility test results

Before After
contrast-result-BEFORE contrast-result-AFTER

Considerations

Tried to keep the comment color as "dark" as possible to keep it inline with the style of the theme while still improving the accessibility.

epidemian commented 1 year ago

This is really nice. I personally find most dark themes unusable due to comments being so dark they are almost unreadable.

Luckily it's usually a simple config change to increase the contrast of comments. But dang, we shouldn't have these defaults :/