Image Color Picker
How browser colour picking works
The tool draws your image onto an HTML canvas — the browser’s built-in drawing surface — scaled to fit the box while keeping its proportions. When you click, the browser reports the click position; the tool maps it back to the corresponding pixel in the original image and reads that pixel’s red, green and blue values with the canvas API. Those three numbers are the colour: HEX is the same three values written in base 16 (#2563EB is 37, 99, 235 in the three channels), and HSL is a re-expression of the same point in colour space — hue as an angle, saturation, lightness — computed with the standard formulas. Nothing cleverer is happening, which is the point: the value you get is the value in the file, not an estimate. One consequence of the scaling: if the image is much larger than the box, neighbouring pixels are squeezed together on screen, so a click lands on the true pixel under the pointer as mapped — zooming the browser page (or picking from a cropped detail using an editor first) gives finer control on busy images.
Building a palette from a photo
Picking colours from a photograph is how many real brand palettes begin — a product shot, a landscape, a painting whose mood you want. The craft is in which pixels: sample the dominant surface for your base (the wall, the sky, the product body), a shadow of the same surface for depth, the smallest vivid detail for the accent — that flower, that label — and something near-white and near-black for your neutrals. Five to eight picks is a palette; thirty is a mood board. The average colour shown with your picks is a useful sanity anchor: it is the image’s centre of gravity, and interfaces built from the photo usually sit comfortably when the average informs the background choice. Once picked, the HEX values drop straight into CSS, and our Color Palette Generator can grow any one of them into a full harmony set with shades and tints, while the Color Converter translates a pick into CMYK for print or HSL for code. Colours in photos are in the sRGB space browsers use, so what you pick is exactly what the web will show — for print work, expect the usual small shift when converting to CMYK, and proof accordingly.
Privacy and file notes
Your image is processed entirely on your device: the file is read into the page, drawn to the canvas, and sampled — at no point is it uploaded, and closing the tab destroys the only copy the page ever held. (One technical exception to know about: images loaded from certain cross-origin web addresses can “taint” a canvas and block pixel reading for security reasons — which is why this tool takes a file from your device rather than a URL.) Any image type the browser can display works — JPG, PNG, WebP, GIF (first frame), SVG rendered as an image — and large photos are fine, since the canvas only ever holds the display-sized copy for picking, while the average-colour computation samples the pixels rather than holding a second full copy. If you need the colour of a physical object, photograph it in daylight next to a sheet of white paper and pick the object, not the paper — phone cameras shift colour with lighting, and no picker can undo a yellow bulb.
Frequently asked questions
How do I get the HEX code of a color in an image?
Load the image with the file button, then click the exact spot whose colour you want. The tool reads that pixel from the canvas and shows its HEX code (with RGB and HSL alongside) and adds the colour to your palette strip. HEX is just the red, green and blue values in base 16: a pixel of rgb(255, 0, 128) is #FF0080. Click several spots to build a set — the palette keeps your picks in order, most recent first.
Is my image uploaded to a server?
No. The file is read locally and drawn onto a canvas element in your browser; the sampling, conversions and average-colour maths all run on your device, and nothing is transmitted or stored. You can confirm by loading the page, going offline, and picking colours — it still works. This is the standard pattern for every tool on this site: the page is the program, and your files never leave your machine.
Why does the picked color look slightly different from the photo?
Three usual suspects. First, the display: screens vary, and a colour can only be shown as your monitor renders it — the HEX value is exact even when two screens disagree about showing it. Second, scaling: a huge photo squeezed into the box averages neighbouring detail on screen, so zoom in for precision work. Third, the photo itself: phone pictures are processed (white balance, HDR tone mapping), so the file’s pixels may already differ from the scene your eyes saw. The picker reports the file faithfully; it cannot report the room.
What is the average color of an image good for?
It is the image’s centre of gravity — the single colour the picture averages to. Designers use it for placeholder backgrounds while images load (so the page does not flash white), for tinting interface chrome to match a hero photo, and as a quick check on a photo’s overall cast: an average that leans orange on a product shot taken under warm light tells you the white balance is off before you pick a single product pixel. The tool computes it by sampling pixels across the image rather than reading every one, which is indistinguishable in result and instant in practice.
Can I pick colors from a screenshot or a logo?
Yes — anything you can save as an image file works: screenshots (PNG is ideal, being lossless), logos, scans, exported design frames. For logos and flat graphics the picks are exact brand colours, which is the fastest way to recover a client’s palette from the only asset they sent you. For photographs, prefer the largest, least-compressed version you have: heavy JPEG compression smears colour at edges, so pick from the middle of a colour region, not on a boundary between two.
Related tools
Behaviour verified in Node on 24 November 2026. Everything runs in your browser — nothing you type is sent anywhere.