Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 642 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 642 Bytes

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