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

sphinx_rtd_theme_ext_color_contrast-0.2.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

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

File metadata

  • Download URL: sphinx_rtd_theme_ext_color_contrast-0.2.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b7054b7d0531358a8b500c5a0c534f3fed66c28f181d24efb883869699be11f0
MD5 8f701d16eef6f7ab8fffd3961a83d277
BLAKE2b-256 05caa551717abce074f348fe4932053c677fb2888a78c8ac78a43b17a12d5ae0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinx_rtd_theme_ext_color_contrast-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17b01edb0c93d28ee34bd7f577648fddb5503b6ec6ef0f896e50d1b326075b30
MD5 74adca82123b37782c9ed96de6c519ef
BLAKE2b-256 998030bc4f48afd18da9cbdd2ccc7dbaa74ef1e34f45070b648f62302ef30fab

See more details on using hashes here.

Supported by

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