About the Color Palette from Image tool
A good colour scheme often starts with a photo: a sunset for a travel brand, a product shot for an e-commerce theme, or a painting for an illustration. This tool reads an image and extracts its dominant colours as a palette you can copy straight into CSS, a design tool or code.
Choose between 3 and 12 colours and one of two proven algorithms. K-means clustering groups the image’s pixels around the most representative colours and gives natural, balanced palettes for photos. Median cut repeatedly splits the colour space along its widest channel, which tends to keep small but distinct accent colours. Both run on a downsampled copy of the image with a fixed seed, so the same image always produces the same palette.
Each swatch shows its share of the image, and clicking one copies its value in HEX, RGB or HSL. Export tabs give you the whole palette as CSS custom properties, SCSS variables, a Tailwind colour object or JSON with every format and percentage. The image is analysed on your device only.
How to use Color Palette from Image
- Drop a photo or paste one from the clipboard.
- Set the “Number of colours” slider (3–12).
- Choose a Method: K-means for photos or Median cut to keep accents.
- Pick HEX, RGB or HSL and click any swatch to copy it.
- Open the CSS variables, SCSS, Tailwind or JSON tab to copy or download the full palette.
Features
Two extraction algorithms
K-means with k-means++ seeding and classic median cut, both deterministic.
3 to 12 colours
Pick a tight brand palette or a wider set of shades from the same image.
Colour share bar
See what percentage of the image each colour represents, sorted from most to least common.
HEX, RGB and HSL
Switch formats and copy any value with one click.
Developer exports
Copy or download CSS custom properties, SCSS variables, a Tailwind config snippet or JSON.
When to use it
- Building a website theme from a brand’s hero photograph.
- Choosing matching text and background colours for a YouTube thumbnail or poster.
- Picking paint or fabric colours inspired by an interior photo.
- Creating a consistent palette for charts from a company’s product imagery.
- Studying the colour composition of a painting or film still.
Frequently asked questions
What is the difference between k-means and median cut?
K-means finds colours that best represent groups of similar pixels, favouring large areas. Median cut divides the colour range into boxes of equal pixel counts, so it more often includes small, vivid accents.
Why doesn’t the palette include a colour I can see?
Small areas may be merged with a similar larger colour. Increase the number of colours or switch to median cut. For one exact pixel, use an image colour picker instead.
Are transparent pixels counted?
No. Pixels that are more than half transparent are ignored, so PNG logos give the palette of the visible artwork only.
Will I get the same result every time?
Yes. Sampling and the k-means starting points use a fixed seed, so the same image and settings always produce the same palette.
Can I export an Adobe ASE swatch file?
Not currently. You can copy HEX values or the JSON export and paste them into most design tools, including Figma and Adobe apps.