Skip to main content

sphinx_rtd_theme extension to enhance color contrast

Project description

This increases some color contrast in sphinx_rtd_theme to better satisfy web content accessibility guidelines. This is by no means a proper fix, but some quick hacks by an uneducated person. It tries to make minimal changes, though.

This package will be deprecated once sphinx_rtd_theme is improved upstream: https://github.com/readthedocs/sphinx_rtd_theme/issues/971

Currently it is not on PyPI (but could be), because I am hoping sphinx_rtd_theme will be updated before that is necessary. To install, add this to requirements.txt:

https://github.com/AaltoSciComp/sphinx_rtd_theme_ext_color_contrast/archive/master.zip

And then add the extension in conf.py:

extensions = [
   ...
   'sphinx_rtd_theme_ext_color_contrast',
]

Style changes

Text contrast:

  • Increase link text saturation

  • Increase literal text saturation

  • Increase footer contrast

Update pygments elements for contrast

Admonition colors

  • Make the admonition title backgrounds darker.

  • These are very long CSS selectors, copied from what the current theme uses.

Make the sidebar background darker

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file sphinx_rtd_theme_ext_color_contrast-0.3.2.tar.gz.

File metadata

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.3.2.tar.gz
Algorithm Hash digest
SHA256 464a579ac030821a328ef485d712f9b0a4b57dcb8e3aab44515dedc1944662e3
MD5 52fe634cfb20fa30e5f7838818e60f70
BLAKE2b-256 25214404b46f2dbf1bb306246fe713f8c25fa730ffdf0e1c93a41cca99cbe959

See more details on using hashes here.

File details

Details for the file sphinx_rtd_theme_ext_color_contrast-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa661dea8d832bb1ba9d5dfb4c0b569890353732b0d7aabffc9cf65eb3b943ba
MD5 7ed4a9824592e1d21933dea219fb86da
BLAKE2b-256 4a877a0d72dec3aea71a035f6cc4016a09ba5861e312ed084b1d16d02e962fb4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page