colorcamp


Namecolorcamp JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/DrAthanas/ColorCamp
SummaryA collection of colors is a Camp!
upload_time2024-06-26 22:18:26
maintainerNone
docs_urlNone
authorArgus J Athanas
requires_python<4.0,>=3.9
licenseApache-2.0
keywords color palette colormap camp plotting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ColorCamp
___________
|  |  | 
| --- | --- |
| Testing | [![CI - Test](https://github.com/DrAthanas/ColorCamp/actions/workflows/python-package.yml/badge.svg)](https://github.com/DrAthanas/ColorCamp/actions/workflows/python-package.yml) [![codecov](https://codecov.io/gh/DrAthanas/ColorCamp/coverage.svg?branch=main)](https://codecov.io/gh/DrAthanas/ColorCamp) |
| Package | [![PyPI Latest Release](https://img.shields.io/pypi/v/colorcamp.svg)](https://pypi.org/project/colorcamp/) |
| Meta | [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/DrAthanas/ColorCamp/blob/main/LICENSE)|

The strategic use of color in branding, marketing, and data analytics is a powerful tool that elicits emotions and simplifies comprehension of complex information. Color choice influences how audiences feel about your message, and it can make intricate data more accessible. ColorCamp is a clean way of dealing with colors, palettes, mappings, and scales, and by storing human readable metadata allow more cohesive color choices.  

> A group of geese is a gaggle, an assembly of musicians is a band, a collective of lions is a pride. This package introduces that a collection of colors is a camp! Welcome to Color Camp!

## Example

```python
import colorcamp as cc

# Working with colors
sky_hex = cc.Hex('#15AAFF', name = 'sky')

# is sky_hex a string
isinstance(sky_hex, str)
# > True

# Easily convert to different color spaces 
sky_hsl = sky_hex.to_hsl()
sky_rgb = sky_hex.to_rgb()

# These colors don't share equality but are comparable
sky_hex == sky_hsl
# > False
sky_hex.equivalence(sky_hsl)
# > True
sky_hex == "#15AAFF"
# > True

# Working with color groups
bright_colors = cc.Palette(
    colors = [
        cc.Hex('#15AAFF', name = 'sky'),
        cc.Hex('#FFAA15', name = 'mustard'),
        cc.Hex('#15FFAA', name = 'lime'),
        cc.Hex('#FF15AA', name = 'pink'),
    ],
    name = 'bright_and_sunny'
)

# Palettes are extended tuples
isinstance(bright_colors, tuple)
# > True

# Can be easily saved and shared
bright_colors.dump_json("./bright_colors.json")

# Use these in your favorite plotting packages!
import seaborn as sns
tips = sns.load_dataset("tips")

sns.scatterplot(
    data=tips, 
    x="total_bill", 
    y="tip", 
    hue="time", 
    palette=bright_colors
)

```

See more detailed examples [here](examples)!

## Core tenets
* Provide additional context to colors so they can be used to convey consistent information
* The colors should be immediately recognized by other applications (e.g. a string, tuple, or dictionary) without additional calls
* Easy to import/export to and from multiple sources and frameworks
* Be as lightweight and portable as possible with minimal to no dependencies 

## Installation
The source code is currently hosted on GitHub at:
https://github.com/DrAthanas/ColorCamp

Binary installers for the latest released version are available at the [Python
Package Index (PyPI)](https://pypi.org/project/colorcamp).

```sh
# from PyPI
pip install colorcamp
```

## Dependencies
python ^3.9, that's it!



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DrAthanas/ColorCamp",
    "name": "colorcamp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "color, palette, colormap, camp, plotting",
    "author": "Argus J Athanas",
    "author_email": "argus@athanas.org",
    "download_url": "https://files.pythonhosted.org/packages/4a/04/2d6b5d5d2300862ce80d0d27d3611176c6414b5ce6f13365b4f76f72933d/colorcamp-0.3.0.tar.gz",
    "platform": null,
    "description": "# ColorCamp\n___________\n|  |  | \n| --- | --- |\n| Testing | [![CI - Test](https://github.com/DrAthanas/ColorCamp/actions/workflows/python-package.yml/badge.svg)](https://github.com/DrAthanas/ColorCamp/actions/workflows/python-package.yml) [![codecov](https://codecov.io/gh/DrAthanas/ColorCamp/coverage.svg?branch=main)](https://codecov.io/gh/DrAthanas/ColorCamp) |\n| Package | [![PyPI Latest Release](https://img.shields.io/pypi/v/colorcamp.svg)](https://pypi.org/project/colorcamp/) |\n| Meta | [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/DrAthanas/ColorCamp/blob/main/LICENSE)|\n\nThe strategic use of color in branding, marketing, and data analytics is a powerful tool that elicits emotions and simplifies comprehension of complex information. Color choice influences how audiences feel about your message, and it can make intricate data more accessible. ColorCamp is a clean way of dealing with colors, palettes, mappings, and scales, and by storing human readable metadata allow more cohesive color choices.  \n\n> A group of geese is a gaggle, an assembly of musicians is a band, a collective of lions is a pride. This package introduces that a collection of colors is a camp! Welcome to Color Camp!\n\n## Example\n\n```python\nimport colorcamp as cc\n\n# Working with colors\nsky_hex = cc.Hex('#15AAFF', name = 'sky')\n\n# is sky_hex a string\nisinstance(sky_hex, str)\n# > True\n\n# Easily convert to different color spaces \nsky_hsl = sky_hex.to_hsl()\nsky_rgb = sky_hex.to_rgb()\n\n# These colors don't share equality but are comparable\nsky_hex == sky_hsl\n# > False\nsky_hex.equivalence(sky_hsl)\n# > True\nsky_hex == \"#15AAFF\"\n# > True\n\n# Working with color groups\nbright_colors = cc.Palette(\n    colors = [\n        cc.Hex('#15AAFF', name = 'sky'),\n        cc.Hex('#FFAA15', name = 'mustard'),\n        cc.Hex('#15FFAA', name = 'lime'),\n        cc.Hex('#FF15AA', name = 'pink'),\n    ],\n    name = 'bright_and_sunny'\n)\n\n# Palettes are extended tuples\nisinstance(bright_colors, tuple)\n# > True\n\n# Can be easily saved and shared\nbright_colors.dump_json(\"./bright_colors.json\")\n\n# Use these in your favorite plotting packages!\nimport seaborn as sns\ntips = sns.load_dataset(\"tips\")\n\nsns.scatterplot(\n    data=tips, \n    x=\"total_bill\", \n    y=\"tip\", \n    hue=\"time\", \n    palette=bright_colors\n)\n\n```\n\nSee more detailed examples [here](examples)!\n\n## Core tenets\n* Provide additional context to colors so they can be used to convey consistent information\n* The colors should be immediately recognized by other applications (e.g. a string, tuple, or dictionary) without additional calls\n* Easy to import/export to and from multiple sources and frameworks\n* Be as lightweight and portable as possible with minimal to no dependencies \n\n## Installation\nThe source code is currently hosted on GitHub at:\nhttps://github.com/DrAthanas/ColorCamp\n\nBinary installers for the latest released version are available at the [Python\nPackage Index (PyPI)](https://pypi.org/project/colorcamp).\n\n```sh\n# from PyPI\npip install colorcamp\n```\n\n## Dependencies\npython ^3.9, that's it!\n\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A collection of colors is a Camp!",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/DrAthanas/ColorCamp",
        "Repository": "https://github.com/DrAthanas/ColorCamp"
    },
    "split_keywords": [
        "color",
        " palette",
        " colormap",
        " camp",
        " plotting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fdc9814705ca629ac70f51ef171e39036d461f73d3c7ebdecbefb98022200704",
                "md5": "7167e1fe817aac1aa98677899239f77b",
                "sha256": "100ba7aa961fa8dede3ecf7d7fe6999c3b9d995a71d013f280f2aa39bd8d9018"
            },
            "downloads": -1,
            "filename": "colorcamp-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7167e1fe817aac1aa98677899239f77b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 77140,
            "upload_time": "2024-06-26T22:18:24",
            "upload_time_iso_8601": "2024-06-26T22:18:24.549896Z",
            "url": "https://files.pythonhosted.org/packages/fd/c9/814705ca629ac70f51ef171e39036d461f73d3c7ebdecbefb98022200704/colorcamp-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a042d6b5d5d2300862ce80d0d27d3611176c6414b5ce6f13365b4f76f72933d",
                "md5": "a033520b3b392dd4f6ca794636285e9a",
                "sha256": "b89fc0287ab82e16a61f9a696878dcc3fe6bd671c52cfb5deaf03dc1b67ad44f"
            },
            "downloads": -1,
            "filename": "colorcamp-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a033520b3b392dd4f6ca794636285e9a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 63072,
            "upload_time": "2024-06-26T22:18:26",
            "upload_time_iso_8601": "2024-06-26T22:18:26.312887Z",
            "url": "https://files.pythonhosted.org/packages/4a/04/2d6b5d5d2300862ce80d0d27d3611176c6414b5ce6f13365b4f76f72933d/colorcamp-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-26 22:18:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DrAthanas",
    "github_project": "ColorCamp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "colorcamp"
}
        
Elapsed time: 0.29094s