Skip to main content

A engine which detects prominent colors from the image.

Project description

prominent-colors-detector

PyPI - Downloads
A engine which detects prominent colors from the image.

Install Python Package

pip install image-pcd

Usage

from pcd import ImageProminentColor
from sklearn.cluster import KMeans

image_color = ImageProminentColor("<path to image file>")
prominent_colors = image_color.get_prominent_colors(KMeans, 3)

The above code-snippet gives you top 3 prominent colors in RGB form sorted in decreasing order of prominence from the image.

image_color.get_image_plot("<Save image file path>")
image_color.get_color_plot("<Save image file path>")

The above code-snippet allows you to save the images of plots of the prominent color and image original colors in 3D-space with RGB components as axis.

Samples (For top-3 Prominent Colors)

Sample Image Prominent Colors Prominent Colors Plot Image Colors Plot
colorful #215d1d #215d1d
#97244a #97244a
#1d8197 #1d8197
colorful_color colorful_image
php #7579b0 #7579b0
#fdfdfe #fdfdfe
#010101 #010101
php_color php_image
nodejs #fefefe#fefefe
#323232 #323232
#67a15d #67a15d
nodejs_color nodejs_image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image-pcd-1.3.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_pcd-1.3.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file image-pcd-1.3.0.tar.gz.

File metadata

  • Download URL: image-pcd-1.3.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for image-pcd-1.3.0.tar.gz
Algorithm Hash digest
SHA256 abb0bd2d225ed649a0fbfac07ae151c5fcc5ced168a6cc7c789451dfa470aa6c
MD5 829ae0c24d72e0b6bfc5580e29dde1fd
BLAKE2b-256 00f5ac2b96deb6274082a2e80b9870a720c0826530ec0c0eed1833b37b3725de

See more details on using hashes here.

File details

Details for the file image_pcd-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: image_pcd-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for image_pcd-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8afe621c4208e4b589d997d5515be360697456044cafd629fc9d41f154be8066
MD5 115a4870d7e61bcae69fe01456864a70
BLAKE2b-256 0c1d3441463ea7e077cf05f6cb1d9ae4d426748c4d3e79004e1bc87a9889048a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page