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.0.tar.gz.

File metadata

  • Download URL: sphinx_rtd_theme_ext_color_contrast-0.3.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b08f173d7a90a0ded74c6b7398b061e2b08522d50be9faffaf8ac56900f579de
MD5 30b712e726c7f4528d99dd61747ee188
BLAKE2b-256 7c2d9de7f7ed5c178a88448915d0c9511ee9c58d5f696777095e6ded4cedcebd

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec3210f2417e68bd8658b4182641654ed708a986ccb5f697326216ede1892276
MD5 5a75930ff682f301f9e81f35924d0d75
BLAKE2b-256 889908b84e927151c1e3cf437526416896ef0ef51491365ae38d3aeb8f8a4bb4

See more details on using hashes here.

Provenance

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