Extracts dominating colors from an image and presents them as a palette.

Overview


ColorPalette

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

MIT License prs welcome

Demo

Live

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

You can deploy your own instance on heroku by clicking the following button

Deploy

What it do

Extracts 10 dominating colors from the image and adds 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. Another independent image of the palette with the hex codes of colors is also generated.

The app does not depend on any APIs for extracting colors. color.py contains the code for it with Pillow as the only dependency.

Some samples

  1. Photo by Luka Odak on Unsplash



  1. Photo by Alexandre Chambon on Unsplash



  1. Photo by Federica Diliberto on Unsplash



  1. Photo by Ashim D’Silva on Unsplash



Directory Structure

|-- Procfile
|-- README.md
|-- app.json
|-- colorpalette
|   |-- __init__.py
|   |-- color.py
|   |-- forms.py
|   |-- routes.py
|   |-- static
|   |   |-- css
|   |   |-- font
|   |   |-- images
|   |   |   |-- favicon
|   |   `-- js
|   `-- templates
|       |-- 413.html
|       |-- base.html
|       |-- index.html
|       `-- picture.html
|-- config.py
|-- requirements.txt
|-- run.py    
`-- LICENSE

Run locally

  1. Clone the repostory:
git clone https://github.com/makkoncept/colorpalette.git
  1. Navigate to the project root and create a virtual environment:
python3 -m venv venv
  1. Activate the virtual environment:

Linux:

source venv/bin/activate

Windows cmd:

venv\Scripts\activate.bat
  1. Install requirements:
pip install -r requirements.txt
  1. Run the development server:
python run.py
  1. View on localhost:5000

Attribution

Icon made by Freepik from www.flaticon.com

Owner
Mayank Nader
SDE @interviewstreet
Mayank Nader
利用近邻法的弱点实现图片缩小后变成另一张图

这是我一个视频的配套代码。 视频是:利用近邻法的弱点实现图片缩小后变成另一张图 https://www.bilibili.com/video/BV1Lf4y1r7dZ 配套代码中,仅generate.py是核心文件,其余的图片神马的,都是赠品。 这个核心文件利用了近邻法缩放的弱点,可以将图a的像素按

偶尔有点小迷糊 182 Dec 19, 2022
Extracts random colours from an image

EXTRACT COLOURS This repo contains all the project files. Project Description A Program that extracts 10 random colours from an image and saves the rg

David .K. Danso 3 Dec 13, 2021
Python binding to Skia Graphics Library

Skia python binding Python binding to Skia Graphics Library. Binding based on pybind11. Currently, the binding is under active development. Install Bi

Kota Yamaguchi 170 Jan 06, 2023
PyPixelArt - A keyboard-centered pixel editor

PyPixelArt - A keyboard-centered pixel editor The idea behind PyPixelArt is uniting: a cmdpxl inspired pixel image editor applied to pixel art. vim 's

Douglas 18 Nov 14, 2022
This app finds duplicate to near duplicate images by generating a hash value for each image stored with a specialized data structure called VP-Tree which makes searching an image on a dataset of 100Ks almost instantanious

Offline Reverse Image Search Overview This app finds duplicate to near duplicate images by generating a hash value for each image stored with a specia

53 Nov 15, 2022
Image-Viewer is a Windows image viewer based on Python 3.

Image-Viewer Hi! Image-Viewer is a Windows image viewer based on Python 3. Using You must download Image-Viewer.exe from the root of the repository. T

2 Apr 18, 2022
Python Program that lets you write in your handwriting!

Handwriting with Python Python Program that lets you write in your handwriting! Inspired by: thaisribeiro.in How to run? Install Unidecode and Pillow

Amanda Rodrigues Vieira 2 Oct 25, 2021
Fast Image Retrieval is an open source image retrieval framework

Fast Image Retrieval is an open source image retrieval framework release by Center of Image and Signal Processing Lab (CISiP Lab), Universiti Malaya. This framework implements most of the major binar

CISiP Lab 39 Nov 25, 2022
3D printer / slicing GUI built on top of the Uranium framework

Cura Ultimaker Cura is a state-of-the-art slicer application to prepare your 3D models for printing with a 3D printer. With hundreds of settings and h

Ultimaker 4.4k Jan 02, 2023
python app to turn a photograph into a cartoon

Draw This. Draw This is a polaroid camera that draws cartoons. You point, and shoot - and out pops a cartoon; the camera's best interpretation of what

Dan Macnish 2k Dec 19, 2022
👾 Python project to help you convert any image into a pixel art.

👾 Pixel Art Generator Python project to help you convert any image into a pixel art. ⚙️ Developer's Guide Things you need to get started with this co

Atul Anand 6 Dec 14, 2022
Fast Image Retrieval (FIRe) is an open source image retrieval project

Fast Image Retrieval (FIRe) is an open source image retrieval project release by Center of Image and Signal Processing Lab (CISiP Lab), Universiti Malaya. This project implements most of the major bi

CISiP Lab 39 Nov 25, 2022
An application that maps an image of a LaTeX math equation to LaTeX code.

Convert images of LaTex math equations into LaTex code.

1.3k Jan 06, 2023
Kainat 13 Mar 07, 2022
Convert the SVG code to PNG and replace the line by a call to the image in markdown

Convert the SVG code to PNG and replace the line by a call to the image in markdown

6 Sep 06, 2022
Turtle graphics || Python

turtle Turtle graphics || Python Rainbow (রংধনু) : Rainbow.using.Python.--.Python.Turtle.graphics.mp4 Human robot (মানব রোবট) : Draw.a.human.robot.usi

Jubair Ahmed Junjun 1 Oct 08, 2021
Simple utility to tinker with OPlus images

OPlus image utilities Prerequisites Linux running kernel 5.4 or up (check with uname -r) Image rebuilding Used to rebuild read-only erofs images into

Wiley Lau 15 Dec 28, 2022
Next-generation of the non-destructive, node-based 2D image graphics editor

Non-destructive, node-based 2D image graphics editor written in Python, focused on simplicity, speed, elegance, and usability

Gimel Studio 238 Dec 30, 2022
Fixes 500+ mislabeled MURA images

In this repository, new csv files are provided that fixes 500+ mislabeled MURA x-rays for all categories. The mislabeled x-rays mainly had hardware in them. This project only fixes the false negative

Pieter Zeilstra 4 May 18, 2022