/dominant-image-color

A Python package to extract the dominant color of an image.

Primary LanguagePython

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