colorpalette

by makkoncept

makkoncept / colorpalette

Flask app : extracts palette of dominating colors from image. https://colorpalette.xyz/

196 Stars 23 Forks Last release: Not found MIT License 54 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


ColorPalette

A simple web app to extract dominant colors from an image.

MIT License prs welcome

Live

View it live at: https://colorpalettedemo.herokuapp.com/

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

Install & run locally

Install:

git clone https://github.com/makkoncept/colorpalette.git
cd colorpalette

Create a virtualenv:

python3 -m venv venv

Activate it on Linux:

. venv/bin/activate

Or on Windows cmd:

venv\Scripts\activate.bat

Install requirements:

pip install -r requirements.txt

Run:

python run.py

View on localhost:5000

Attribution

Icon made by Freepik from www.flaticon.com

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.