Color Palette Extractor
Upload an image and extract the 5 most dominant colors using client-side pixel sampling and k-means-style clustering. Each swatch shows hex, rgb, and hsl, plus contrast ratios between pairs for accessibility checks.
Features
- 5 dominant colors via client-side clustering
- Hex, RGB, and HSL formats
- WCAG contrast ratios between pairs
- Drag-drop image preview
Frequently Asked Questions
- How are the colors chosen?
- The tool samples pixels from the uploaded image and groups them with a simple k-means-style clustering to pick the 5 most representative colors.
- Is my image uploaded?
- No. The image is processed entirely in your browser via a canvas — it never leaves your device.
- What formats are shown?
- Each swatch is displayed in hex, rgb(), and hsl() formats, and contrast ratios between pairs are computed for accessibility.