A python package for easy management of colors and palettes.
Project description
What is colorir?
colorir is a package used to create and manipulate palettes and colors. What makes colorir different from other similar packages like colour and palettable is that colorir focuses on personalization and interoperability: you can create your own color palettes and use them with any other python package such as matplotlib, tkinter or flask.
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
cl.swatch(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
File details
Details for the file colorir-2.0.4.tar.gz
.
File metadata
- Download URL: colorir-2.0.4.tar.gz
- Upload date:
- Size: 107.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2938324cef3543171038f78ae682b25465d1b74fd702217b178807f59eb9e839 |
|
MD5 | e3b38cdf33658eedabd65476047136fe |
|
BLAKE2b-256 | 5fdd3f220340115b5de3d31e61baec245d998166d16f1e6cbe5e7b556bd5d3d8 |
File details
Details for the file colorir-2.0.4-py3-none-any.whl
.
File metadata
- Download URL: colorir-2.0.4-py3-none-any.whl
- Upload date:
- Size: 135.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7889cc2a7d3416239e48e197915a743b6211b001ee10a9e0c66ecc6352961fc8 |
|
MD5 | 31673fb0dd1a3f3fe88c6be858bc0399 |
|
BLAKE2b-256 | 4d1a569489e73ef04a2a59ac26daa95b2b116e82f0c12d54d87219f0a1c5ccf1 |