Skip to main content

sphinx-rtd-theme color contrast extension

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

Other changes

Workaround for https://github.com/executablebooks/sphinx-togglebutton/issues/75 . This isn’t exactly “color contrast” but this is the repo we use for sphinx-rtd-theme fixups, so it can go here for now.

Metadata

Release files for sphinx-rtd-theme-ext-color-contrast 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-rtd-theme-ext-color-contrast 0.3.3
File Size Uploaded
sphinx_rtd_theme_ext_color_contrast-0.3.3.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-rtd-theme-ext-color-contrast 0.3.3
File Interpreter ABI Platform
sphinx_rtd_theme_ext_color_contrast-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / sphinx_rtd_theme_ext_color_contrast-0.3.3.tar.gz

Download URL sphinx_rtd_theme_ext_color_contrast-0.3.3.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8f44c3f909ecbc851e1aa11e385539fd15294c436d24be2d73bf289bc43b7a10
BLAKE2b-256 checksum
How to use checksums
77364ae0314cae458273e53ed91d3883e69daa19da83c10d8e7e0d20466d594c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / sphinx_rtd_theme_ext_color_contrast-0.3.3-py3-none-any.whl

Download URL sphinx_rtd_theme_ext_color_contrast-0.3.3-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
724384f8a251bf39fa6cb7fca32748f93ca67e75ac8c512ed65530d822f803ed
BLAKE2b-256 checksum
How to use checksums
f233a5e50f638f90745abe51ea3d276128cba6c193650b6a7d3890e269409348
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page