Skip to content

29decibel/dominant_colors

Repository files navigation

DominantColors

Working in progress...

Blog post

livebook dominant colors usage

Extract dominant colors from given image path. Wrapper around the awesome Rust library kmeans_colors.

Installation

def deps do
  [
    {:dominant_colors, "~> 0.1.4"}
  ]
end

Usage

file_path = "test-image.png"
colors = DominantColors.dominant_colors(file_path)
# {:ok , ["#b49480", "#4b2e24", "#201310", "#7e99c5", "#947260", "#715042", "#94aacc", "#d1b8a7"] }

About

Get dominant colors (k-means) from given image (wrapper on top of kmeans_colors)

Resources

Stars

Watchers

Forks

Packages

No packages published