blenderskool / pigmnts

🎨 Color palette generator from an image using WebAssesmbly and Rust
https://pigmnts.web.app
MIT License
73 stars 4 forks source link

Median cut algorithm #5

Closed blenderskool closed 4 years ago

blenderskool commented 4 years ago

Experiment with the Median cut algorithm to extract the color palette.

Reference: https://spin.atomicobject.com/2016/12/07/pixels-and-palettes-extracting-color-palettes-from-images/

blenderskool commented 4 years ago

While the Median cut algorithm gives consistent results across multiple executions, results are not very different from what kmeans++ can achieve.

Maybe using Median cut differently can make it more useful to be in the library.