Skip to main content

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)

Metadata

Release files for vibrant-python 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vibrant-python 0.1.6
File Size Uploaded
vibrant_python-0.1.6.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vibrant-python 0.1.6
File Interpreter ABI Platform
vibrant_python-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / vibrant_python-0.1.6.tar.gz

Download URL vibrant_python-0.1.6.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
669b205ee9ec3220ca5256878992bebf93623592d78f39187c7919db45ac54af
BLAKE2b-256 checksum
How to use checksums
9ca2b809a7b6a3a3f3e040f4285817e5b7df89cfe0e78f4603bd7b1befdcfed2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.8.5 Windows/10

Release files / vibrant_python-0.1.6-py3-none-any.whl

Download URL vibrant_python-0.1.6-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c400d0437950debbe80f980f5b908beace8e13a8819a98fe2dd6e1b40a485840
BLAKE2b-256 checksum
How to use checksums
c88a8e1b21a2d722fe729a9f4fcb08b74b794ffa64897a707d6475cb38b0bde5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.8.5 Windows/10

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page