A collection of accessible pygments styles
Project description
Accessible pygments themes
This package includes a collection of accessible themes for pygments based on different sources.
WCAG 2.1 - AAA compliant
The following themes are AAA compliant with WCAG 2.1 criteria for color contrast.
a11y-dark
a11y-high-contrast-dark
pitaya-smoothie
- Colorblindness friendly.github-light
- Colorblindness friendly.github-dark
- Colorblindness friendly.github-light-colorblind
- Colorblindness friendly.github-dark-colorblind
- Colorblindness friendly.github-light-high-contrast
- Colorblindness friendly.github-dark-high-contrast
- Colorblindness friendly.gotthard-dark
- Colorblindness friendly.
WCAG 2.1 - AA compliant
The following themes are AA compliant with WCAG 2.1 criteria for color contrast.
a11y-light
a11y-high-contrast-light
gotthard-light
- Colorblindness friendly.blinds-light
- Colorblindness friendly.blinds-dark
- Colorblindness friendly.greative
- Accessible to most forms of colorblindness and low light settings.
For a demo of all our themes please click here!
Installation
Our package is available in both conda and pip via,
conda install -c conda-forge accessible-pygments
pip install accessible-pygments
If you want to install it directly from source,
git clone git@github.com:Quansight-Labs/accessible-pygments.git
cd accessible-pygments
pip install .
Usage
Import it using the name identifier for the desired theme,
from pygments.formatters import HtmlFormatter
HtmlFormatter(style='a11y-light').style
<class 'accessible-pygments.A11yLight'>
Tests
Just open a terminal and run,
python test/run_tests.py
You will see the results under test/results
in html format for each supported theme.
Acknowledgements
We want to thank the following sources for being the source of inspiration of one or more themes that are available in this repository,
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
Hashes for accessible-pygments-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7b57a9b15958e9601c7e9eb07a440c813283545a20973f2574a5f453d0e953e |
|
MD5 | ecacd117d7258a285ccc282a33abd906 |
|
BLAKE2b-256 | b2507055ebd9b7928eca202768bcf5f8f69d8d69dec1767c956c08f055c5b31e |
Hashes for accessible_pygments-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 416c6d8c1ea1c5ad8701903a20fcedf953c6e720d64f33dc47bfb2d3f2fa4e8d |
|
MD5 | f027573d55e00f25251d270fc11fe718 |
|
BLAKE2b-256 | 20d745cfa326d945e411c7e02764206845b05f8f5766aa7ebc812ef3bc4138cd |