Extract color palettes from images in format similar to palettes module in Android.
Project description
Vibrant
Python port for node-vibrant to extract color palettes from images in format similar to palettes in Android.
Installation
python -m pip install vibrant-python
Features
- Color palette extraction
- Fully typed codebase
- Color space conversion utilities
- Contrast ration calculation
This library is a one-to-one port of the node-vibrant package which itself is port of Vibrant.js. They all aim to produce color palette from images in format similar to the Palette module in Android. The primary use-case of this for me was to produce colors from album cover arts (simply extracting the most prominent colors isn't always the best fit in most cases and requires a more sophisticated solution) where such color palettes work well.
The Python codebase is fully typed so great editor support is expected for intuitive use. Check out Docs for more info.
Demo
from vibrant import Vibrant
v = Vibrant()
palette = v.get_palette('/path/to/image')
color = palette.dark_muted
print(color.rgb)
Project details
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
Hashes for vibrant_python-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8292dd1366bb6fdcb9fd09215d5b1ed64489bf55ea5baafd5491a4d60cc550f3 |
|
MD5 | 8e9b8ab2965472a3737d3eda6bcc0ebc |
|
BLAKE2b-256 | 23fa69495eb044afa63a64f79bdb27e5764df555bf9b18b5a3fbb79c3d9bfcee |