pylettes


Namepylettes JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/fcomitani/pylettes
SummaryBeautiful palettes in Python
upload_time2022-10-12 21:33:24
maintainer
docs_urlNone
authorFederico Comitani
requires_python
licenseGPL-3.0
keywords palette plotting plots color
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img src="docs/figs/pylettes_logo.png" width=400, padding=100>

## Pylettes
### v0.2.0

[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/fcomitani/pylettes)](https://github.com/fcomitani/pylettes/releases/tag/v0.2.0)
[![PyPI](https://img.shields.io/pypi/v/pylettes)](https://pypi.org/project/pylettes/)
[![Licence](https://img.shields.io/github/license/fcomitani/pylettes)](https://github.com/fcomitani/pylettes/blob/main/LICENSE)
[![GitHub top language](https://img.shields.io/github/languages/top/fcomitani/pylettes)](https://github.com/fcomitani/pylettes/search?l=python)
[![Palettes count](https://img.shields.io/badge/palettes%20count-42-9cf)](https://github.com/fcomitani/pylettes/blob/main/docs/figs/all_palettes.png)

`pylettes` is a lightweight `matplotlib`-compatible collection of beautiful palettes for Python 3.

See all currently available palettes [here](https://github.com/fcomitani/pylettes/blob/main/docs/figs/all_palettes.png).

### Installation

`pylettes` can be easily installed with `PiPy`

`pip install pylettes`.

To install the latest (unreleased) version you can download it from this repository by running 
 
    git clone https://github.com/fcomitani/pylettes
    cd pylettes
    python setup.py install

The only requirement is `matplotlib >= 1.3.1`.

### Usage

Palettes can be imported directly from the `pylettes` package.
They can be transformed into `matplotlib` color maps by instantiating the class and calling its `cmap` attribute.

    from pylettes import Acapulco2Paris

    custom_cmap = Acapulco2Paris().cmap

Single colors can be directly accessed by index.

    first_color = Acapulco2Paris()[0]

The `show_colors` method allows you to visualize and inspect any palette.

    Acapulco2Paris().show_colors()
<img src="docs/figs/acapulco_colors.png" width=400, padding=100>

The list of colors can be visualized as a continuous scale by providing the `continuous` argument.

    Acapulco2Paris().show_colors(continuous=True)
<img src="docs/figs/acapulco_colors_continuous.png" width=400, padding=100>

Palettes can be reversed by activating the `reverse` flag upon initialization.

    Acapulco2Paris(reverse=True).show_colors()
<img src="docs/figs/acapulco_colors_reverse.png" width=400, padding=100>

All currently available palettes can be inspected with `list_all_palettes()`, 
while `list_palettes_by_tag()` allows you to search palettes by keywords.
All available tags can be listed with `list_all_tag()`. 
Finally, to visualize multiple palettes at once use `show_multiple_palettes()`.
For example, you can inspect all colorblind-friendly palettes with

    from pylettes import list_palettes_by_tag, show_multiple_palettes

    show_multiple_palettes(list_palettes_by_tag('colorblind'))

### Contributions

I plan to keep this library updated and add more options with time. 

New palette submissions are welcome!
Submitting a palette is easy, all you need is a name,
the list of colors in hex format and associated tags.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fcomitani/pylettes",
    "name": "pylettes",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "palette,plotting,plots,color",
    "author": "Federico Comitani",
    "author_email": "federico.comitani@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/84/8c/51cf5a79eed5831f51a44f61fc0f96c1fdf7017d39377b0c638338b982c6/pylettes-0.2.0.tar.gz",
    "platform": null,
    "description": "<img src=\"docs/figs/pylettes_logo.png\" width=400, padding=100>\n\n## Pylettes\n### v0.2.0\n\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/fcomitani/pylettes)](https://github.com/fcomitani/pylettes/releases/tag/v0.2.0)\n[![PyPI](https://img.shields.io/pypi/v/pylettes)](https://pypi.org/project/pylettes/)\n[![Licence](https://img.shields.io/github/license/fcomitani/pylettes)](https://github.com/fcomitani/pylettes/blob/main/LICENSE)\n[![GitHub top language](https://img.shields.io/github/languages/top/fcomitani/pylettes)](https://github.com/fcomitani/pylettes/search?l=python)\n[![Palettes count](https://img.shields.io/badge/palettes%20count-42-9cf)](https://github.com/fcomitani/pylettes/blob/main/docs/figs/all_palettes.png)\n\n`pylettes` is a lightweight `matplotlib`-compatible collection of beautiful palettes for Python 3.\n\nSee all currently available palettes [here](https://github.com/fcomitani/pylettes/blob/main/docs/figs/all_palettes.png).\n\n### Installation\n\n`pylettes` can be easily installed with `PiPy`\n\n`pip install pylettes`.\n\nTo install the latest (unreleased) version you can download it from this repository by running \n \n    git clone https://github.com/fcomitani/pylettes\n    cd pylettes\n    python setup.py install\n\nThe only requirement is `matplotlib >= 1.3.1`.\n\n### Usage\n\nPalettes can be imported directly from the `pylettes` package.\nThey can be transformed into `matplotlib` color maps by instantiating the class and calling its `cmap` attribute.\n\n    from pylettes import Acapulco2Paris\n\n    custom_cmap = Acapulco2Paris().cmap\n\nSingle colors can be directly accessed by index.\n\n    first_color = Acapulco2Paris()[0]\n\nThe `show_colors` method allows you to visualize and inspect any palette.\n\n    Acapulco2Paris().show_colors()\n<img src=\"docs/figs/acapulco_colors.png\" width=400, padding=100>\n\nThe list of colors can be visualized as a continuous scale by providing the `continuous` argument.\n\n    Acapulco2Paris().show_colors(continuous=True)\n<img src=\"docs/figs/acapulco_colors_continuous.png\" width=400, padding=100>\n\nPalettes can be reversed by activating the `reverse` flag upon initialization.\n\n    Acapulco2Paris(reverse=True).show_colors()\n<img src=\"docs/figs/acapulco_colors_reverse.png\" width=400, padding=100>\n\nAll currently available palettes can be inspected with `list_all_palettes()`, \nwhile `list_palettes_by_tag()` allows you to search palettes by keywords.\nAll available tags can be listed with `list_all_tag()`. \nFinally, to visualize multiple palettes at once use `show_multiple_palettes()`.\nFor example, you can inspect all colorblind-friendly palettes with\n\n    from pylettes import list_palettes_by_tag, show_multiple_palettes\n\n    show_multiple_palettes(list_palettes_by_tag('colorblind'))\n\n### Contributions\n\nI plan to keep this library updated and add more options with time. \n\nNew palette submissions are welcome!\nSubmitting a palette is easy, all you need is a name,\nthe list of colors in hex format and associated tags.\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Beautiful palettes in Python",
    "version": "0.2.0",
    "project_urls": {
        "Download": "https://github.com/fcomitani/pylettes/archive/0.2.0.tar.gz",
        "Homepage": "https://github.com/fcomitani/pylettes"
    },
    "split_keywords": [
        "palette",
        "plotting",
        "plots",
        "color"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7a763d08b719b78fb8203e0b846f6743d4b0f964ea338e44867d2cc4d2505f8",
                "md5": "32f1dd545050a75f371ea673ab0a0181",
                "sha256": "26113b5ec40b77985fcda14c8754c0a1ca8cb77deb4120a67759a57dd5614d88"
            },
            "downloads": -1,
            "filename": "pylettes-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "32f1dd545050a75f371ea673ab0a0181",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19076,
            "upload_time": "2022-10-12T21:33:22",
            "upload_time_iso_8601": "2022-10-12T21:33:22.666340Z",
            "url": "https://files.pythonhosted.org/packages/c7/a7/63d08b719b78fb8203e0b846f6743d4b0f964ea338e44867d2cc4d2505f8/pylettes-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "848c51cf5a79eed5831f51a44f61fc0f96c1fdf7017d39377b0c638338b982c6",
                "md5": "f845635e3f77d7fe02fb620da7626db1",
                "sha256": "fc89497944a2515675ffd7aebc50eef42bfc5c536c6074361333749aa021646f"
            },
            "downloads": -1,
            "filename": "pylettes-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f845635e3f77d7fe02fb620da7626db1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17837,
            "upload_time": "2022-10-12T21:33:24",
            "upload_time_iso_8601": "2022-10-12T21:33:24.689431Z",
            "url": "https://files.pythonhosted.org/packages/84/8c/51cf5a79eed5831f51a44f61fc0f96c1fdf7017d39377b0c638338b982c6/pylettes-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-10-12 21:33:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fcomitani",
    "github_project": "pylettes",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pylettes"
}
        
Elapsed time: 0.10111s