Giter Site home page Giter Site logo

cyrke / colorpalette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makkoncept/colorpalette

1.0 0.0 0.0 2.16 MB

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

License: MIT License

Python 36.34% HTML 63.66%

colorpalette's Introduction

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

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

credits

Stackoverflow and script

colorpalette's People

Contributors

hvrc avatar makkoncept avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.