Extract a Color Palette From an Image
Pull the dominant colors out of any image and turn them into a usable palette. The tool samples the photo and groups its colors with median-cut quantization, then ranks them by how much of the image they cover. Copy any hex code, export the whole palette as CSS custom properties, and choose how many colors you want. Everything runs in your browser, so the image never leaves your device.
How to extract a color palette
- Drop an image in, or click to browse.
- Choose how many colors you want in the palette.
- Click any swatch to copy its hex, or copy the whole palette as CSS.
Examples
Build a brand palette from a photo
A landscape photo, 6 colors
Six ranked hex codes with the share of the image each covers
Frequently asked questions
Is my image uploaded anywhere?
No. The image is sampled and analyzed entirely in your browser. It never leaves your device, so private images stay private.
How are the colors chosen?
The tool uses median-cut quantization: it samples the image, repeatedly splits the widest spread of colors, and averages each group. Colors are then ranked by how many pixels they represent.
Why might I get fewer colors than I asked for?
If an image only contains a handful of distinct colors (for example a simple logo), the tool returns just those rather than inventing extras.
Can I export the palette?
Yes. Click any swatch to copy its hex code, or use Copy CSS to get the whole palette as :root custom properties ready to paste into a stylesheet.
Will it match the colors exactly?
Each swatch is the average of a cluster of similar pixels, so it represents a region of the image rather than one exact pixel. For an exact pixel color, use the image color picker.
Related tools
Image Color Picker
Pick the exact color of any pixel in an image and get its hex, RGB, and HSL values. Hover to preview, click to lock. Runs in your browser, nothing uploaded.
Color Palette Generator
Generate complementary, analogous, triadic, tetradic and monochromatic color palettes from one base color. Pick a hex, copy each shade as hex, RGB or HSL.
Image Converter
Convert images between PNG, JPEG, and WebP in your browser. Pick a background to flatten transparency, set quality, and download. Nothing is uploaded.
Add Border to Image
Add a colored border or frame around an image, with adjustable width and color. Live preview, runs in your browser, nothing uploaded.
APNG Detector
Check whether a PNG file is an animated PNG (APNG) in your browser. See the frame count, loop count, and dimensions read straight from the file. Private.
Blur Image
Blur a whole image or drag a box to blur a face, name, or address. Adjustable blur strength, live preview, runs in your browser. Nothing is uploaded.