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 ratio 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.6.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

vibrant_python-0.1.6-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file vibrant_python-0.1.6.tar.gz.

File metadata

  • Download URL: vibrant_python-0.1.6.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.8.5 Windows/10

File hashes

Hashes for vibrant_python-0.1.6.tar.gz
Algorithm Hash digest
SHA256 669b205ee9ec3220ca5256878992bebf93623592d78f39187c7919db45ac54af
MD5 9f42036694de5158c58d7cd9f08e629a
BLAKE2b-256 9ca2b809a7b6a3a3f3e040f4285817e5b7df89cfe0e78f4603bd7b1befdcfed2

See more details on using hashes here.

File details

Details for the file vibrant_python-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: vibrant_python-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.8.5 Windows/10

File hashes

Hashes for vibrant_python-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c400d0437950debbe80f980f5b908beace8e13a8819a98fe2dd6e1b40a485840
MD5 bb0d35eee0c851397789b9224b0ebaa3
BLAKE2b-256 c88a8e1b21a2d722fe729a9f4fcb08b74b794ffa64897a707d6475cb38b0bde5

See more details on using hashes here.

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