About the Color Palette Generator

Color Palette Generator is a free online tool that extracts the most visually dominant colors from any image and returns them as copyable hex codes — useful for designers, developers, and anyone building color schemes from reference images.

How It Works

When you upload an image, it is sent to our server where Python processes it with Pillow and scikit-learn. The image is first resized to 200×200 pixels (for speed), then all pixels are converted to an array of RGB values. K-Means clustering (with k = your chosen number of colors, between 3 and 10) is run on those pixels with 10 random initialisations to find the most statistically representative cluster centers. The cluster centers are the dominant colors. Finally, they are sorted from darkest to lightest by perceived luminance (using the ITU-R BT.601 formula: 0.299R + 0.587G + 0.114B) and returned as hex codes.

What Is sortout.app?

sortout.app is a growing collection of focused web tools, each designed to do exactly one thing well. Every tool is free, requires no account, and is built to load fast anywhere.

When to Use This Tool

Privacy

Your files are sent to our server over HTTPS, processed immediately, and deleted — never stored or shared. See our full Privacy Policy.

Frequently Asked Questions

Is this tool free?

Yes, completely free with no usage limits.

How many colors can I extract?

Between 3 and 10. The default is 6. More colors capture more nuance; fewer give a simpler palette.

Why doesn't the palette match what I see?

K-Means finds the statistically dominant colors across all pixels. If your image has a large uniform background (e.g., white), that color will dominate. The algorithm is not aware of which colors look "important" aesthetically — only which cover the most pixel area.

What formats are supported?

JPEG, PNG, WebP, and GIF. Maximum file size is 20 MB.

Contact

Questions or feedback? Open an issue at github.com/sortout-app/feedback or email hello@sortout.app.