A collection of colors is a Camp!
Project description
ColorCamp
Testing | |
Package | |
Meta |
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
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!
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).
# from PyPI
pip install colorcamp
Dependencies
python ^3.9, that's it!
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
File details
Details for the file colorcamp-0.3.0.tar.gz
.
File metadata
- Download URL: colorcamp-0.3.0.tar.gz
- Upload date:
- Size: 63.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/4.4.0-19041-Microsoft
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b89fc0287ab82e16a61f9a696878dcc3fe6bd671c52cfb5deaf03dc1b67ad44f |
|
MD5 | a033520b3b392dd4f6ca794636285e9a |
|
BLAKE2b-256 | 4a042d6b5d5d2300862ce80d0d27d3611176c6414b5ce6f13365b4f76f72933d |
File details
Details for the file colorcamp-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: colorcamp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 77.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/4.4.0-19041-Microsoft
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100ba7aa961fa8dede3ecf7d7fe6999c3b9d995a71d013f280f2aa39bd8d9018 |
|
MD5 | 7167e1fe817aac1aa98677899239f77b |
|
BLAKE2b-256 | fdc9814705ca629ac70f51ef171e39036d461f73d3c7ebdecbefb98022200704 |