Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

DominantColors

This is another code snippet to find dominant colors within a given image in PHP by k-means++ clustering. A more thorough description on how to use it and an explanation how it works will follow soon, as it's intended to be part of a tutorial. Until then, find a description in DominantColors.php.

Requires GD for PHP (which almost all systems will already have installed).

Possible future improvements

  • add Wordpress wrapper function
  • add more detailed description
  • switch from RGB to LAB color space for results closer to human perception, include as option
  • accelerate with triangular equation

About

A k-means++ clustering algorithm to find dominant colors of an image in PHP.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages