Skip to main content

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

vibrant_python-0.1.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

vibrant_python-0.1.1-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page