How to pick a color from an image
- 1To get color from image files, drag a picture onto the drop area or click it to choose a file. PNG, JPG, WebP, GIF and SVG all work.
- 2Move the pointer over the image. A magnifier shows the pixels under it and the HEX code updates as you move. On a touch screen, press and drag; with the keyboard, use the arrow keys.
- 3Click, or press Enter, to pick the pixel. Its HEX, RGB and HSL codes appear under Picked color, each with a copy button, and the color is added to Recent colors.
- 4Look at Dominant colors for a ready-made palette of 5 to 8 swatches, with the share of the picture each covers. Click a swatch to pick it, or copy its HEX code.
How the image color picker works
Every pixel in an image is stored as numbers for red, green and blue. This tool draws your picture onto a canvas in the browser and reads the number triple under the pointer at full resolution, so the code you get is the real value of that pixel, not an average of its neighbours. The magnifier enlarges an 11 by 11 pixel area so you can aim precisely, which matters on photos where neighbouring pixels differ slightly.
This hex color picker from image shows each color code three ways. HEX, like #FF5733, is what CSS, design tools and most web editors expect. RGB, like rgb(255, 87, 51), lists the three channels from 0 to 255. HSL, like hsl(11, 100%, 60%), describes the same color as hue, saturation and lightness, which is easier to adjust by hand. If you need to translate a value between formats, the HEX to RGB converter does it in both directions.
The palette is a color identifier for the whole picture. The image is shrunk, and its pixels are grouped by median cut, which repeatedly splits the range of colors where they vary most and then averages each group. The result is a handful of swatches ordered by how much of the picture they cover. It is a quick way to pull a brand palette from a logo or a mood from a photograph.
Where your browser supports the EyeDropper feature, as Chrome and Edge do, a Pick from screen button lets you sample a color from anywhere on your display, not only from the loaded image. Everything runs locally: the picture is never uploaded, and there is no sign-up or limit. Colors in a photo depend on how it was shot and on any color profile, so a pixel can look slightly different from the paint or screen it was taken from.
When people need a color from a picture
Matching a brand or logo
Use the hex code from image files of a logo to match buttons, headings and backgrounds exactly in your design or code.
Building a palette from a photo
Pull colors from image photographs to base a website, slide deck or illustration on the dominant ones.
Checking a design
Click a screenshot to read the color code from image mock-ups, then compare it with your CSS.
Matching paint, fabric and décor
Pick the color code from a picture of a room or material to compare shades or search for a close match.
Frequently asked questions
How do I get a color from an image?
+
Add the image, hover to find the pixel you want and click it. The color's HEX, RGB and HSL codes appear straight away with copy buttons.
Is the color code exact?
+
Yes. The value is read from the pixel at the image's full resolution. Very small differences can still come from JPG compression or a color profile.
Can I get a hex code from image files on my phone?
+
Yes. Touch and drag over the image to move the magnifier, and lift your finger to pick the pixel.
What is the dominant colors palette?
+
It is a set of 5 to 8 swatches summarising the main colors of the picture, with the share each one covers.
Can I pick a color from anywhere on my screen?
+
In Chrome and Edge, use Pick from screen. Other browsers don't offer the EyeDropper feature, so only the loaded image can be sampled.
Is my image uploaded?
+
No. The picture is read in your browser and never leaves your device.
Related tools
HEX to RGB Color Converter
Convert colors between HEX, RGB and HSL in both directions, including 8-digit hex and alpha. Color picker, RGB sliders, CSS Color 4 syntax and a WCAG contrast check against white and black.
Image Converter — WebP, PNG & JPG
Convert PNG, JPG, WebP, GIF, and BMP images to WebP, JPEG, or PNG with an adjustable quality slider. Batch-convert multiple files at once with live size comparison. Everything runs in your browser — no uploads, no size limits.
Crop Image
Crop an image with a draggable box, aspect presets (1:1, 4:3, 16:9, 9:16 or custom) and exact pixel values. Handles phone-photo rotation. Export as PNG, JPG, or WebP.
Image to Base64
Encode any image as a base64 data URL. Copy as raw string, CSS background, HTML img tag, or Markdown — perfect for inlining icons and small assets.