Skip to content

Dominant colors will extract the dominant colours from the image using K-means algorithm and gives you how many colours you need.

License

Notifications You must be signed in to change notification settings

natasam/DominantColorsFlutter

Repository files navigation

dominant_colors

(soon on the pub.dev)

A Flutter project that extracts dominant colors from images using the K-means algorithm. The Palette Library with the same purpose probably as Android's Pallete API.

Here is the article explaining this specific algorithm used for this case:

Medium Article - Extracting Dominant Image Colors in Flutter with the K-means++ Algorithm

Because the goal is to find the most dominant colors in a photo, clustering algorithms are the best solution. K-means is the most widely used centroid-based clustering algorithm. K-means++ is an improved version of the K-means algorithm. It's main advantage is a smarter initialization of the centroids, which tends to lead to faster convergence and better final clustering results.

Screenshot examples

Flutter screenshot 1 Flutter screenshot 2 Flutter screenshot 3 Flutter screenshot 0

About

Dominant colors will extract the dominant colours from the image using K-means algorithm and gives you how many colours you need.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published