Find the code of any color in your image
Love a color in a photo and want it in your design or website? Need a company logo's colors to build a matching presentation? This tool does two things: picks the color of any point in the image with single-pixel accuracy, and automatically extracts the dominant color palette with each color's share of the image.
How to use it
- Choose, drop or paste an image.
- A palette of eight dominant colors appears, sorted by how much of the image they cover.
- Click any point in the image — or drag across it — to read its exact color.
- Copy the code in the format you need, or copy the whole palette as CSS variables.
HEX vs RGB vs HSL
- HEX: the most common web format, e.g.
#4F46E5— three hexadecimal pairs for red, green and blue. - RGB: the same values in decimal from 0–255, e.g.
rgb(79, 70, 229), used in design and code. - HSL: describes hue, saturation and lightness — the easiest format for creating lighter or darker shades.
How the palette is extracted
We downscale the image inside your browser and run K-Means clustering, which groups similar pixels into eight clusters. The average of each cluster becomes a palette color, so the palette reflects the colors that truly dominate the image, not rare ones.
Ideas
- Build a consistent visual identity for your site from your logo.
- Pick slide or social post colors that match a cover photo.
- Match paint or decor colors from a room photo you like.
- Create a beautiful gradient from two palette colors with the CSS Gradient Generator.
Frequently Asked Questions
Can I pick a color from a screenshot?
Yes. Take a screenshot and paste it straight into the page with Ctrl+V, then click the color you want.
Why does a palette color differ slightly from a specific pixel?
Palette colors are averages of similar pixels; clicking gives you the exact color of one pixel.
How do I use the copied CSS variables?
Paste them into your CSS, then use a color with var(--color-1) in any property such as color or background.
Is the image uploaded?
No. The image is analyzed entirely in your browser.
Does it work on mobile?
Yes — tap the image with your finger to pick a color.
Last updated: