accessible-pygments


Nameaccessible-pygments JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/Quansight-Labs/accessible-pygments
SummaryA collection of accessible pygments styles
upload_time2023-03-22 22:47:55
maintainer
docs_urlNone
authorStephannie Jimenez Gacha
requires_python
licenseBSD
keywords pygments style accessible a11
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Accessible pygments themes

[![conda version](https://img.shields.io/conda/vn/conda-forge/accessible-pygments?color=e27e8c&style=for-the-badge)](https://anaconda.org/conda-forge/accessible-pygments)
[![pip version](https://img.shields.io/pypi/v/accessible-pygments?color=63a6c8&style=for-the-badge)](https://pypi.org/project/accessible-pygments/)
[![conda-forge downloads](https://img.shields.io/conda/dn/conda-forge/accessible-pygments?label=conda-forge%20downloads&style=for-the-badge)](https://anaconda.org/conda-forge/accessible-pygments)
[![pip downloads](https://img.shields.io/pypi/dm/accessible-pygments?color=%23acc00d&label=PyPI%20downloads&style=for-the-badge)](https://pypi.org/project/accessible-pygments/)
[![demo](https://img.shields.io/badge/Demo-Click%20me!-blueviolet?style=for-the-badge)](https://quansight-labs.github.io/accessible-pygments/)

This package includes a collection of accessible themes for pygments based on different sources.

![Screenshot of all light themes side by side](./docs/light_themes.png)

![Screenshot of all dark themes side by side](./docs/dark_themes.png)

## WCAG 2.1 - AAA compliant

The following themes are AAA compliant with [WCAG 2.1 criteria for color contrast](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html).

- [`a11y-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_dark)
- [`a11y-high-contrast-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_high_contrast_dark)
- [`pitaya-smoothie`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/pitaya_smoothie) - Colorblindness friendly.
- [`github-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_light) - Colorblindness friendly.
- [`github-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_dark) - Colorblindness friendly.
- [`github-light-colorblind`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_light_colorblind) - Colorblindness friendly.
- [`github-dark-colorblind`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_dark_colorblind) - Colorblindness friendly.
- [`github-light-high-contrast`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_light_high_contrast) - Colorblindness friendly.
- [`github-dark-high-contrast`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_dark_high_contrast) - Colorblindness friendly.
- [`gotthard-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/gotthard-dark) - Colorblindness friendly.

## WCAG 2.1 - AA compliant

The following themes are AA compliant with [WCAG 2.1 criteria for color contrast](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html).

- [`a11y-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_light)
- [`a11y-high-contrast-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_high_contrast_light)
- [`gotthard-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/gotthard-light) - Colorblindness friendly.
- [`blinds-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/blinds-light) - Colorblindness friendly.
- [`blinds-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/blinds-dark) - Colorblindness friendly.
- [`greative`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/greative) - Accessible to most forms of colorblindness and low light settings.

For a demo of all our themes please [click here!](https://quansight-labs.github.io/accessible-pygments/)

## 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,

- [a11y dark and light syntax highlighting](https://github.com/ericwbailey/a11y-syntax-highlighting).
- [pitaya smoothie vscode theme](https://github.com/trallard/pitaya_smoothie).
- [github vscode themes](https://github.com/primer/github-vscode-theme).
- [gotthard vscode themes](https://github.com/janbiasi/vscode-gotthard-theme/).
- [blinds vscode themes](https://github.com/orbulant/blinds-theme).
- [greative vscode theme](https://github.com/SumanKhdka/Greative-VSCode-Theme).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Quansight-Labs/accessible-pygments",
    "name": "accessible-pygments",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pygments style accessible a11",
    "author": "Stephannie Jimenez Gacha",
    "author_email": "steff456@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/50/7055ebd9b7928eca202768bcf5f8f69d8d69dec1767c956c08f055c5b31e/accessible-pygments-0.0.4.tar.gz",
    "platform": null,
    "description": "# Accessible pygments themes\n\n[![conda version](https://img.shields.io/conda/vn/conda-forge/accessible-pygments?color=e27e8c&style=for-the-badge)](https://anaconda.org/conda-forge/accessible-pygments)\n[![pip version](https://img.shields.io/pypi/v/accessible-pygments?color=63a6c8&style=for-the-badge)](https://pypi.org/project/accessible-pygments/)\n[![conda-forge downloads](https://img.shields.io/conda/dn/conda-forge/accessible-pygments?label=conda-forge%20downloads&style=for-the-badge)](https://anaconda.org/conda-forge/accessible-pygments)\n[![pip downloads](https://img.shields.io/pypi/dm/accessible-pygments?color=%23acc00d&label=PyPI%20downloads&style=for-the-badge)](https://pypi.org/project/accessible-pygments/)\n[![demo](https://img.shields.io/badge/Demo-Click%20me!-blueviolet?style=for-the-badge)](https://quansight-labs.github.io/accessible-pygments/)\n\nThis package includes a collection of accessible themes for pygments based on different sources.\n\n![Screenshot of all light themes side by side](./docs/light_themes.png)\n\n![Screenshot of all dark themes side by side](./docs/dark_themes.png)\n\n## WCAG 2.1 - AAA compliant\n\nThe following themes are AAA compliant with [WCAG 2.1 criteria for color contrast](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html).\n\n- [`a11y-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_dark)\n- [`a11y-high-contrast-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_high_contrast_dark)\n- [`pitaya-smoothie`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/pitaya_smoothie) - Colorblindness friendly.\n- [`github-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_light) - Colorblindness friendly.\n- [`github-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_dark) - Colorblindness friendly.\n- [`github-light-colorblind`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_light_colorblind) - Colorblindness friendly.\n- [`github-dark-colorblind`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_dark_colorblind) - Colorblindness friendly.\n- [`github-light-high-contrast`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_light_high_contrast) - Colorblindness friendly.\n- [`github-dark-high-contrast`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/github_dark_high_contrast) - Colorblindness friendly.\n- [`gotthard-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/gotthard-dark) - Colorblindness friendly.\n\n## WCAG 2.1 - AA compliant\n\nThe following themes are AA compliant with [WCAG 2.1 criteria for color contrast](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html).\n\n- [`a11y-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_light)\n- [`a11y-high-contrast-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/a11y_high_contrast_light)\n- [`gotthard-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/gotthard-light) - Colorblindness friendly.\n- [`blinds-light`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/blinds-light) - Colorblindness friendly.\n- [`blinds-dark`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/blinds-dark) - Colorblindness friendly.\n- [`greative`](https://github.com/Quansight-Labs/accessible-pygments/tree/main/a11y_pygments/greative) - Accessible to most forms of colorblindness and low light settings.\n\nFor a demo of all our themes please [click here!](https://quansight-labs.github.io/accessible-pygments/)\n\n## Installation\n\nOur package is available in both conda and pip via,\n\n```\nconda install -c conda-forge accessible-pygments\n```\n\n```\npip install accessible-pygments\n```\n\nIf you want to install it directly from source,\n\n```\ngit clone git@github.com:Quansight-Labs/accessible-pygments.git\ncd accessible-pygments\npip install .\n```\n\n## Usage\n\nImport it using the name identifier for the desired theme,\n\n```\nfrom pygments.formatters import HtmlFormatter\nHtmlFormatter(style='a11y-light').style\n<class 'accessible-pygments.A11yLight'>\n```\n\n## Tests\n\nJust open a terminal and run,\n\n```\npython test/run_tests.py\n```\n\nYou will see the results under `test/results` in html format for each supported theme.\n\n\n## Acknowledgements\n\nWe want to thank the following sources for being the source of inspiration of one or more themes that are available in this repository,\n\n- [a11y dark and light syntax highlighting](https://github.com/ericwbailey/a11y-syntax-highlighting).\n- [pitaya smoothie vscode theme](https://github.com/trallard/pitaya_smoothie).\n- [github vscode themes](https://github.com/primer/github-vscode-theme).\n- [gotthard vscode themes](https://github.com/janbiasi/vscode-gotthard-theme/).\n- [blinds vscode themes](https://github.com/orbulant/blinds-theme).\n- [greative vscode theme](https://github.com/SumanKhdka/Greative-VSCode-Theme).\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "A collection of accessible pygments styles",
    "version": "0.0.4",
    "split_keywords": [
        "pygments",
        "style",
        "accessible",
        "a11"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20d745cfa326d945e411c7e02764206845b05f8f5766aa7ebc812ef3bc4138cd",
                "md5": "f027573d55e00f25251d270fc11fe718",
                "sha256": "416c6d8c1ea1c5ad8701903a20fcedf953c6e720d64f33dc47bfb2d3f2fa4e8d"
            },
            "downloads": -1,
            "filename": "accessible_pygments-0.0.4-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f027573d55e00f25251d270fc11fe718",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 29320,
            "upload_time": "2023-03-22T22:47:53",
            "upload_time_iso_8601": "2023-03-22T22:47:53.264433Z",
            "url": "https://files.pythonhosted.org/packages/20/d7/45cfa326d945e411c7e02764206845b05f8f5766aa7ebc812ef3bc4138cd/accessible_pygments-0.0.4-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b2507055ebd9b7928eca202768bcf5f8f69d8d69dec1767c956c08f055c5b31e",
                "md5": "ecacd117d7258a285ccc282a33abd906",
                "sha256": "e7b57a9b15958e9601c7e9eb07a440c813283545a20973f2574a5f453d0e953e"
            },
            "downloads": -1,
            "filename": "accessible-pygments-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "ecacd117d7258a285ccc282a33abd906",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11650,
            "upload_time": "2023-03-22T22:47:55",
            "upload_time_iso_8601": "2023-03-22T22:47:55.320150Z",
            "url": "https://files.pythonhosted.org/packages/b2/50/7055ebd9b7928eca202768bcf5f8f69d8d69dec1767c956c08f055c5b31e/accessible-pygments-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-22 22:47:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Quansight-Labs",
    "github_project": "accessible-pygments",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "accessible-pygments"
}
        
Elapsed time: 0.04873s