tanitall / colorpalette

Flask app : extracts palette of dominating colors from image. https://colorpalettedemo.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Live demo

What it do

Extracts 10 dominating colors from the image and add the palette to the bottom of the image (inspired by colorpalette.cinema). You can adjust the palette height, outline color and width to match your image dimension.

How it works

The color.py script does all the work. It uses Pillow. It takes the image and reduce the number of colors in it to 10, but the way it does this is interesting as only dominating colors are choosen as they can best resemble the original image.

image with 10 colors

Screenshot

original image

To know more about the method you can read this post

Run Locally

  • git clone https://github.com/makkoncept/colorpalette.git
  • cd colorpalette
  • python3 -m venv venv
  • source venv/bin/activate for linux
  • venv\Scripts\activate.bat for windows
  • pip install -r requirements.txt
  • python run.py

View on localhost:5000

credits

Stackoverflow and script

About

Flask app : extracts palette of dominating colors from image. https://colorpalettedemo.herokuapp.com/


Languages

Language:HTML 67.2%Language:Python 32.8%