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.1.tar.gz
.
File metadata
- Download URL: colorir-2.0.1.tar.gz
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84301d169d0ebbdc673aa16232e48dff7da2748726bcba6dfe017adec99fe0cc |
|
MD5 | e6f96c1baaef3b250d6d22ccd00135a1 |
|
BLAKE2b-256 | ad72a9b0c38fd4d2766a1d0ad130f59065b7f4d4e422e598551751d19fd2c77a |
File details
Details for the file colorir-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: colorir-2.0.1-py3-none-any.whl
- Upload date:
- Size: 97.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 273e0a4f4b1d652df7a07e4c77c7000872bed6cfec8146915deddf2182db13d1 |
|
MD5 | c7ccc8b692cbd32d5d24607fed985bef |
|
BLAKE2b-256 | a43bee4b26b951532a1ca49d7ddbdf96a03427b1c0898e18dfefac372a8fb7b7 |