Get Dominant Color
returns [num, num, num]
Uses the median cut algorithm provided by quantize.js to cluster similar colors and return the base color from the largest cluster.
returns [ [num, num, num], [num, num, num], ... ]
Use the median cut algorithm provided by quantize.js to cluster similar colors.
Thanks to jfsiii for a large number of code improvements and others for submitting issues and fixes.
Licensed under the Creative Commons Attribution 2.5 License
- Free for use in both personal and commercial projects.
- Attribution requires leaving author name, author homepage link, and the license info intact.