Skip to main content

A engine which detects prominent colors from the image.

Project description

prominent-colors-detector

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.2.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.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image-pcd-1.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 128e3c2c34a4e8881895197a5c7d4ea2ea0f30ac1042f9c033b71292bda0908e
MD5 83e50162673bd065f23c91334729e40d
BLAKE2b-256 ae7c649d4a834c1c72e3bc173b36e6c09c56ea8cfd8b7348086a22c6039c5e72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: image_pcd-1.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f72aa8793cd45cd28f58caea4eef24ebe145fb57f03327f363a64d2205732ff2
MD5 3e45b6b6e5d6b8dad0801bda90ccac59
BLAKE2b-256 f211f47763170893eaee3beddd495e3ecea659223eadc2e2d4327f4b4cb1b743

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