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.1.0.tar.gz (3.2 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.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image-pcd-1.1.0.tar.gz
  • Upload date:
  • Size: 3.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 b050ce6ee8e01bfea984c154c63452d5e9dc421f208fafc4e7492296374940cf
MD5 2a2fee93650f9fe64e9704d72dbee5ea
BLAKE2b-256 3f9315cf699608f16ecf55de006dc86b1d3afc36438bc169b67483da862a1489

See more details on using hashes here.

File details

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

File metadata

  • Download URL: image_pcd-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25aad3008ee3a80f29fef3bf59529297d8b063096131c3fc743797f767ae228e
MD5 044f65adec79bb662acb668ae36de796
BLAKE2b-256 a4b5ec583b3caa650871836d2b0c2dd3893223390fec47553aaee3ed790f0ec3

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