A python package for easy management of colors and palettes.
Project description
What is colorir?
colorir is a package used to create and manipulate color palettes.
Main features
Create color schemes and save them to use in different projects
Interpolate colors in different formats (such as RGB, CIELab etc) to make gradients and color maps
Have access to a curated selection of unique color palettes and color names
Easily visualize swatches of colors in the terminal
Getting started
It is very easy to create an original and attractive color palette with colorir:
import colorir as cl
grad = cl.PolarGrad(["ffff00", "ff00ff"]) # Creates a gradient from yellow to magenta
palette = cl.StackPalette(grad.n_colors(5)) # Samples 5 colors along the gradient and creates a palette with them
palette *= cl.HCLab(1, 0.5, 1) # Desaturates the palette 50% to get a more pleasing look
palette # Shows the palette we created in the terminal
colorir also works seamlessly with other python packages and you don’t have to convert colorir objects to pass them as input to other frameworks:
import matplotlib.pyplot as plt
plt.pie([0.25, 0.15, 0.20, 0.20, 0.20], colors=palette)
plt.show()
For more information (including use-cases and examples), see colorir’s documentation here.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colorir-2.1.3.tar.gz.
File metadata
- Download URL: colorir-2.1.3.tar.gz
- Upload date:
- Size: 107.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c30f0bd2e056699dbc8f989a70d2965087cffcd3b26a0ee909fb3f7ae736d11
|
|
| MD5 |
f0740d4ffeb1f204f097c485631445ee
|
|
| BLAKE2b-256 |
112919d279954c5a0e292482ca82002f4ba8f027e4c9ed8e4c8f0dccc3541f65
|
File details
Details for the file colorir-2.1.3-py3-none-any.whl.
File metadata
- Download URL: colorir-2.1.3-py3-none-any.whl
- Upload date:
- Size: 135.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f88f9a02ad1013e6b1ff80662e9e821ecd55e2de42d674b3f462338473be838e
|
|
| MD5 |
a872c95f66500b75c19564c51bd31734
|
|
| BLAKE2b-256 |
4007e815c62ed86a68c90c6be2f3729abd7505a102ec703adbb18c7e32e8bd45
|