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!
Metadata
Release files for colorcamp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| colorcamp-0.3.0.tar.gz | 63.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| colorcamp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 140.2 kB
Release files / colorcamp-0.3.0.tar.gz
| Download URL | colorcamp-0.3.0.tar.gz |
|---|---|
| Size | 63.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b89fc0287ab82e16a61f9a696878dcc3fe6bd671c52cfb5deaf03dc1b67ad44f
|
|
BLAKE2b-256 checksum How to use checksums |
4a042d6b5d5d2300862ce80d0d27d3611176c6414b5ce6f13365b4f76f72933d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.13 Linux/4.4.0-19041-Microsoft
|
Release files / colorcamp-0.3.0-py3-none-any.whl
| Download URL | colorcamp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 77.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
100ba7aa961fa8dede3ecf7d7fe6999c3b9d995a71d013f280f2aa39bd8d9018
|
|
BLAKE2b-256 checksum How to use checksums |
fdc9814705ca629ac70f51ef171e39036d461f73d3c7ebdecbefb98022200704
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.13 Linux/4.4.0-19041-Microsoft
|