Extract key colors from images using optimized JavaScript algorithms.
- Average, Perceptual Dominant, and Top 5 Colors
- Uses K-Means clustering for precise palette analysis
- Highly optimized with Uint32Array and bitwise ops
- Perceptual analysis uses saturation + brightness weighting
- Processes 8 pixels at a time with minimal memory overhead
- Supports luminance-weighted color for realistic tones