Color palette extractor using CANVAS