A simple library that automates the generation of distinguishable colors paletes, and offers other color tools.
Project description
ChromaCraft
ChromaCraft is a Python package for generating and visualizing distinguishable color palettes. It provides tools for generating color sets with specific criteria, such as minimum and maximum color differences. This package is particularly useful for data visualization and design tasks where a set of visually distinct colors is needed.
Installation
To install you can simply use pip
pip install chroma-craft´´
Usage
Import the ChromaCraft package and use its functions to generate and visualize color palettes.
import chroma_craft as cc
import seaborn as sns
# Set the Seaborn style for better visualization
sns.set_style('whitegrid')
# Generate a list of distinguishable colors
n = 24 # Number of colors to generate
min_color_diff = 0.25 # Minimum color difference
max_color_diff = 1.2 # Maximum color difference
colors = cc.generate_distinguishable_colors(n, min_color_diff, max_color_diff, hexa=True)
# Plot the color palette
cc.plot_color_palette(colors)
print(colors)
['#c6dd6d', '#51e3fb', '#6c8c98', '#80f79e', '#cd4e76', '#09fe8a', '#2e3c0c', '#17229b',
'#d6c1b1', '#82a243', '#843520', '#7a039f', '#21a371', '#d4c00d', '#7c90dd', '#537e02',
'#66495e', '#342147', '#ef7b43', '#b90d76', '#c39b7e', '#8adf15', '#1556cc', '#3bde54']
Debug
Here's an example of how debug information is shown:
import chroma_craft as cc
import seaborn as sns
# Set the Seaborn style for better visualization
sns.set_style('whitegrid')
# Number of colors to generate
n = 3
# Minimum and maximum color difference
min_color_diff = 0.25
max_color_diff = 1.2
# Generate a list of distinguishable colors
colors = cc.generate_distinguishable_colors(n, min_color_diff,
max_color_diff, debug=True, hexa=False)
# Plot the color palette
cc.plot_color_palette(colors)
Author
ChromaCraft was created by Felix. If you find this package useful or have any feedback, please feel free to reach out to croma_craft@auneria.com.
- GitHub: Felix-Pedro
- LinkedIn: Felix
Project details
Release history Release notifications | RSS feed
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 chroma-craft-0.1.0.tar.gz
.
File metadata
- Download URL: chroma-craft-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eb4603a881acb2e9d7a3088d6071a95829bcc2268d844cc3637206bbc527ebf |
|
MD5 | efb10a8fb6ea76e01c5cf7554f70afa0 |
|
BLAKE2b-256 | 5ab3435b4e8e33362b641ca48129d06f917eb36e5d2ee287cca946758cb4d2b0 |
File details
Details for the file chroma_craft-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: chroma_craft-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ab364679d4b7380711e9cfca16be594ea7df11cdd9ece8e16fa6b9b5e35bd15 |
|
MD5 | 79da3702fb44890465d16fe395c3dc9b |
|
BLAKE2b-256 | 260af617680e7c3ce98b52540f3423c2eaa751a5e81455ab9067b41a8205138a |