Extract the main colours of a photo as a palette with hex, RGB and HSL codes and their share of the picture, and export it as CSS, SCSS, Tailwind, JSON, CSV or GIMP.
Initializing in your browser…
Grade the colour of a photo like a film: white balance in kelvin, shadows, midtones and highlights, a tone curve, and split toning, with looks such as teal and orange.
Turn an image into Base64 text or a data URL to embed in HTML, CSS or Markdown, checked to decode back to your exact file. Optional resizing first.
Compare two versions of an image and see what changed: each changed area outlined and shown close up, with slider, fade and side-by-side views and a similarity score.
A designer wants five colours from a sunset photo to build a matching web page theme.
Settings
sample-sunset.jpg, 1600 x 1067 Colours: 5 Grouping: Median cut
Palette
#020516 black 25.02% contrast 20.27:1 on white #4D1D95 indigo 24.99% contrast 10.91:1 on white #6A3ADB blueviolet 24.97% contrast 6.48:1 on white #6C2AB0 rebeccapurple 12.51% contrast 8.09:1 on white #E16944 tomato 12.51% contrast 3.33:1 on white
Median cut splits the photo's colours into groups of similar size, which is why the shares come out close to quarters and eighths, and then picks the most common real colour in each group. The near-black of the trees and water is the obvious text colour (20.27:1 on white). The orange of the sun is the natural accent, but at 3.33:1 on white it is only suitable for large text or decoration, not body copy, which needs 4.5:1.
Pull the main colours out of a photo, a logo or a screenshot. The tool shows a strip of the palette sized by how much of the picture each colour covers, lists every colour with its hex, RGB and HSL codes, and exports the palette for CSS, SCSS, Tailwind, JSON, CSV or GIMP.
Themes and accent colours that match the imagery on a page.
Recover exact colours from a logo or packaging.
Colour studies and palettes from reference photos.
Pick matching colours from a mood photo.
Extract five colours from the header photo with Median cut, export CSS custom properties and use the darkest as the text colour and the brightest as an accent.
Use Most common on a flat logo to get its exact brand colours, with their hex codes and contrast ratios.
Take twelve colours from a reference photo and export a GIMP palette to load into GIMP, Krita or Inkscape.
Real colours only. The tool counts the colours of the picture as they are, without shrinking it first. Shrinking blends neighbouring pixels into in-between shades that the picture never contained, which is how some palette tools report a purple from a picture of red and blue stripes. Every colour shown here is one that actually appears in your picture. Very large pictures are counted by sampling every few pixels, which can only ever find real colours.
Three ways to group them. There is no single right answer to which colours are a picture's main ones, so three methods are offered. Most common lists the colours that appear most often, exactly as counted, which suits logos and flat graphics. Median cut splits the picture's colours into groups of similar size and takes the most common colour of each, which gives a balanced palette for photos. k-means groups colours by how different they look to the eye and then shows the real colour closest to each group's average; it starts from a random draw, so Try another draw can give a slightly different result. Choose 3, 5, 8, 12 or 16 colours.
What each colour tells you. Each entry shows the hex code (tap it to copy), RGB and HSL values, the nearest CSS colour name, the share of the picture it represents, and its text contrast ratio on white and on black, so you can see straight away whether a colour works for text. The strip above the list is drawn to scale, so a colour that covers a quarter of the picture takes a quarter of the strip.
Exports. Copy hex codes puts the list on the clipboard. CSS custom properties and SCSS variables come with the colour name and share as a comment, the Tailwind file extends your theme with palette-1, palette-2 and so on, JSON and CSV carry every value, and the GIMP palette opens in GIMP, Inkscape and Krita. How the palette was found shows how many pixels were counted and how far apart the closest two colours are. Transparent pixels are left out, and nothing is uploaded.
Because there is no single correct answer to which colours matter most. Most common favours the colours that appear most often, Median cut balances the palette across the picture, and k-means groups colours by how they look. Pick the result that suits your use.
Yes. The picture is not resized before counting, so every colour listed is one the picture contains. For k-means, where a group's average is usually not a real colour, the closest real colour is shown.
The share of the picture's pixels that belong to that colour's group, so the percentages add up to the whole picture.
k-means starts from randomly chosen colours and refines them. Different starting points can settle on slightly different groups, especially in photos with smooth gradients.
CSS custom properties for plain CSS, SCSS variables for Sass, or the Tailwind file to add the colours to a Tailwind theme.
No. The colours are counted in your browser.
Images are decoded, edited, and exported entirely inside this browser tab. No originals, exports, or metadata are uploaded.