Skip to main content

Get the most frequent color from an image

Project description

Dominant Image Color

A Python package to extract the dominant color of an image. Given the path to an image file, the get_image_color function returns the hex code of the most frequent color in the image.

Installation

To install the package, simply run the following command:

pip install dominant_image_color

Usage

Here's an example of how to use the get_image_color function:

from dominant_image_color import get_image_color

hex_code = get_image_color("path/to/image.jpg")
print(hex_code)

Dependencies

These dependencies will be automatically installed when you install the package using pip.

  • Pillow

Contributions

Contributions to this package are welcome. If you have any suggestions or bug reports, feel free to open an issue or a pull request on Github. https://github.com/itsmdsameerkhan/dominant-image-color

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

dominant_image_color-1.0.1.tar.gz (1.5 kB view hashes)

Uploaded Source

Supported by

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