Skip to main content

A package to extract dominant colors from images and represent them in RGB, Hex, and HSL formats.

Project description

Pixel Palette

A Python package to extract dominant colors from an image and display them in RGB, Hex, and HSL formats.

Installation

Install the package using pip:

pip install pixelpalette

Usage

from pixelpalette import extract_colors

image_path = "you_image_path"
colors = extract_colors(image_path, n_colors=10)

for i, color in enumerate(colors):
    print(f"Color {i+1}:")
    print(f"  RGB: {color['RGB']}")
    print(f"  Hex: {color['Hex']}")
    print(f"  HSL: {color['HSL']}")

Outout

Color 1:
  RGB: rgb(255, 200, 100)
  Hex: #ffc864
  HSL: hsl(30, 100%, 70%)
...

Dependencies

  • numpy
  • matplotlib
  • scikit-learn

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

pixelpalette-1.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

pixelpalette-1.0.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file pixelpalette-1.0.0.tar.gz.

File metadata

  • Download URL: pixelpalette-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for pixelpalette-1.0.0.tar.gz
Algorithm Hash digest
SHA256 90a8a501c4ceefcd2e8e9764425ca197be0d8305e0de59ca554c1bacf8d23c51
MD5 54e1fcafb2e510e1bbdc74fb1aac8340
BLAKE2b-256 84b0e93a19b4acc666acc8080a93c6b343f73d76f587d193472e54db998b8b08

See more details on using hashes here.

File details

Details for the file pixelpalette-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pixelpalette-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for pixelpalette-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 137000b6ce373b30c7b96a69561d14854ff56d29a62f64a4f1bdae75ac39afda
MD5 e55f4e3e4d849a32ed6c16763ebcaeb8
BLAKE2b-256 186f199a540eb0667d9a3a748ad4ab76df5aa2bc9d2538f6574b619f3b27d81e

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