Dominant Colors

A Flutter package for extracting dominant colors from images using K-means clustering algorithm.

Demo

Features

  • 🎨 Extract dominant colors from any image
  • âš¡ High-performance implementation with image resizing
  • 📊 Get detailed cluster information (pixel count, percentages)
  • 🎯 Configurable color count and algorithm parameters
  • 🔄 K-means++ initialization for better results
  • 🎪 Returns colors sorted by dominance
  • 📱 Flutter-optimized and null-safe

Installation

Add this to your pubspec.yaml:

dependencies:
  kmeans_dominant_colors:
    git:
      url: https://github.com/Mouhib777/kmeans_dominant_colors# kmeans_dominant_colors

Libraries

kmeans_dominant_colors
A Flutter package for extracting dominant colors from images using K-means clustering.