python-pillow / python-pillow/Pillow
Identify dominant colors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.8k
- Forks
- 2.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 89
Description
This is a feature request.
Would it be within the scope of pillow to have a function that identifies dominant colors within an image? The relevant question on StackOverflow has been viewed ~50k times.
One of the suggestions is the colorthief library that identifies an image's palette and dominant colors with only Pillow (and math, but it's not necessary). Could that code be ported to Pillow?
Pillow's own getcolors() doesn't solve the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Pillow's existing getcolors() behavior and the linked colorthief approach, then compare the requested palette and dominant-color behavior with the StackOverflow example. Done would require an agreed Pillow API, an implementation scope, and tests showing that dominant colors are identified for representative images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100