Simple two-page app where you can obtain the color palette of any pictore on the internet and the ratios in which this one appears in the image.
Check the working project here, but that link is an older version, glitch doesn't support open-cv and scikit-learn in a free account project. This older version uses colorgram, another python library for color picker, but is cooler the version of this repo, works almost identically, the difference is the color picker methods.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
Check this page to see the project working!
In this project I use flask, numpy, scikit-learn and openCV python libraries partnering with HTML, SASS and Javascript Vanilla to develope a pretty simple 2-page app, basically you give an image and the app with a K-NN algorithm applied to the image gives you the color palette of that image, these are the rules:
- You can only take images posted publically on internet.
- If you want more than 3 colors, you will have to wait like 20 seconds or so. K-NN is a little bit expensive computationally speaking.
Here's why I did this project:
Inspiration from my good friend Zaid, he made a twitter bot that tweets everyday a painting with its respective color palette, I just wanted to experiment with openCV a little bit and practice some simple ML algorithm. I am thinking on re-do this project but with my own knn algorithm.
You will need this on your computer
- Python 3.6+
- Pip (Compatible with python 3.6+)
- venv or your own environment creator
To get a local copy up follow these simple steps.
- Go to your terminal and travel where you want to save this project, in my case will be in a
Dev
folder.
cd Dev/
- Now create a clone of this repository with
git clone https://github.com/BubuDavid/Color-Palette_Picker.git
- You are almost there, lets go for the prerequisites.
- You only have to go into your terminal, get into your root folder (not the Dev folder, the repository folder), and write
pip install -r requirements.txt
If everything worked out, then you are ready to get your color palettes!
You just need to run
python app.py
and voilà! Your server is ready and running, just go to your web browser to this direction http://localhost:8888/
. The following steps are pretty straightforward.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
David, but you can call me Bubu - @DBubu73 - david.pedroza.segoviano@gmail.com
Project Link: Color Picker!