Dark mode: add class to invert image brightness by hugovk · Pull Request #128 · python/python-docs-theme
Re: #44 (comment).
Add a class to invert image brightness (but not contrast), similar to how we handled it for the PEPs repo: python/peps#2409 and python/peps#2949.
We can then add this class to images like this:
.. figure:: hashlib-blake2-tree.png :alt: Explanation of tree mode parameters. :class: invert-in-dark-mode
Which changes this:
Into:
And light mode remains unchanged:
This can be merged before or after python/cpython#103983.


