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

File metadata

  • Download URL: sphinx_rtd_theme_ext_color_contrast-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.3

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cdfd3dfd2baa49927196d7c320a8b0eb068eeee2c83be592f5daf5ae44c54880
MD5 4ef7ca6b936eb63784d6233e370d1c86
BLAKE2b-256 98b33971e1943466129691a9e537f8c6e86907e40bf3fadafa25addc145efce4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f81d45fa8a9b5c7038cabddb42bbb6e88990e9e1ccde90cfca4e82b7c6ace96
MD5 59b400da742aea2d7217aef7bb1318cd
BLAKE2b-256 82cef150bc1df626a82848d6e90e5ad715429a03638cd57352ff71b8f701d2bd

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