Skip to content

totallynotadi/vibrant-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Extract color palettes from images in format similar to palettes in Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages