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.1.1.tar.gz (3.6 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.1.1.tar.gz.

File metadata

  • Download URL: sphinx_rtd_theme_ext_color_contrast-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 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.1.1.tar.gz
Algorithm Hash digest
SHA256 e64b8cfc4e950f73768f45a2759a75bca2ae65397399b5d75c06ed99f2423f50
MD5 42e7df0eae04463b3f2de22c57ecf47b
BLAKE2b-256 0428aa1a321f115bd38fe98be0157ac63dc70daf698a0c32f6b9f2577fa24e66

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sphinx_rtd_theme_ext_color_contrast-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9aba9e7cf0904bd8b991c143cc5f02e8c0ecec49fc540818bb0297d25df80614
MD5 9d3f656f6e2ef0c32aeedd474304f130
BLAKE2b-256 e67cf13b7ad3a90132a4f1fac5027becd3a7b7599af4feeb7bc1d306fb432360

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