fileformer
search⌘KtranslateENexpand_moreupload_fileConvert
Converters8 file families · 44 direct conversions
What changes in a conversionarrow_forward
home/image-tools/color-picker

Image Color Picker Tool

Point at any pixel. Get its exact colour.

Open a photo, screenshot or logo, then hover to magnify and click to pick. You get the colour as HEX, RGB and HSL, plus the six colours that make up most of the image. It all runs on your device; it all happens in your browser.

sample: sunset.png · 720 × 580
at the pin · 9× zoom
picked · 470, 150#933c67plum
HEX#933C67content_copyCopyRGBrgb(147, 60, 103)content_copyCopyHSLhsl(330 42% 41%)content_copyCopyCMYK0 59 30 42content_copyCopyCSS namenearest: brown · ΔE 8.9content_copyCopynameplumcontent_copyCopy
main colours in this imageshare of the image · click to copy
#461f5422%Copy#23103918%Copy#6e2b6217%Copy#94376e16%Copy#cf606c15%Copy#f3ac7612%Copy
~/one-pixel-lies

In a photo, one pixel is rarely the colour you meant.

Camera noise and JPEG compression make neighbouring pixels differ. Averaging a small square gives the colour your eye actually sees. These are the values around the point you picked above; choose the sample size the picker should use.

Single pixel#933c67the raw value
3 × 3 average#97406c8 units from the single pixel
5 × 5 average#96406b6 units from the single pixel
9 × 9 average#963f6b6 units from the single pixel
~/same-colour-four-ways

Which format to paste where.

Every format above describes the same picked colour. They exist because different tools think about colour differently. Each card shows your colour in that format.

HEX#933C67Three pairs of hex digits for red, green and blue. Compact and universal.CSS, Figma, brand guides
RGB147, 60, 103The same three numbers written in decimal, 0-255 each.Photoshop, code, APIs
HSL330° 42% 41%Hue, saturation and lightness. Easy to make a lighter or duller version.CSS themes, design tweaks
CMYK0/59/30/42A rough ink mix for print. A printer’s profile will adjust it.print briefs, InDesign
~/the-number-depends-on-who-reads-it

The value in the file isn’t always the value you pick.

Before any picker sees a pixel, the browser decodes the file, may convert it using colour information stored inside, and stores it in a canvas with its own rules. Eight tiny test images are built byte by byte below and read back by your browser, once as it would display them and once with colour conversion switched off.

Test imageIn the fileYour browserNo conversionWhat happened
PNG, no colour infoIHDR + IDAT128, 128, 128128, 128, 128128, 128, 128Untagged images are assumed to be sRGB and passed through unchanged.
PNG + gAMA 1.0 (linear)gAMA = 100000128, 128, 128188, 188, 188128, 128, 128The gAMA chunk says the numbers are linear light, so 128 means half of white’s light, which sRGB writes as about 188. The browser re-encodes it, and a picker reports 188, not the 128 stored in the file.
PNG + sRGB + gAMA 1.0sRGB intent 0, then gAMA128, 128, 128128, 128, 128128, 128, 128An sRGB chunk overrides gAMA, as the PNG specification requires, so the stored value is used.
PNG + gAMA 1/2.2gAMA = 45455128, 128, 128128, 128, 128128, 128, 128Gamma 1/2.2 is close to the sRGB curve, so the value barely moves (128).
JPEG, red line beside blue1 px columns, quality 95255, 0, 0150, 24, 150-JPEG stores colour at half resolution (4:2:0), so a one-pixel red line next to blue comes back as 150, 24, 150. Pick from an area, not a single pixel, in JPEGs.
Canvas, almost transparentputImageData rgba(200,100,50,3)200, 100, 50 · α3170, 85, 85 · α3-Canvas stores colour premultiplied by alpha. At alpha 3 of 255 only a few levels survive, so you read back 170, 85, 85 · α 3.
Display P3 red, sRGB canvasfillStyle color(display-p3 1 0 0)P3 (1, 0, 0)255, 0, 0-P3 red is outside sRGB, so it is clipped to plain sRGB red (255, 0, 0). A picker on an sRGB canvas can’t report wide-gamut colours.
sRGB red, Display P3 canvasgetContext("2d", { colorSpace: "display-p3" })255, 0, 0234, 51, 35-The same red, stored in a P3 canvas, reads as 234, 51, 35: identical colour, different numbers, because P3’s primaries are further out.
PNGs are built here with real IHDR, gAMA, sRGB, IDAT (zlib via CompressionStream) and IEND chunks with CRC-32, then decoded by createImageBitmap with colorSpaceConversion "default" and "none", drawn to a canvas and read with getImageData. Results vary between browsers, this column is yours.
Screen picker vs file pickerThe screen picker reads the pixel after your operating system has applied the display’s colour profile, then converts it back to sRGB. Click “Pick from screen” above, then click exactly on the white-ringed pin in the image to compare it with the value this page reads from the canvas.
From the canvas at the pin#933C67
From your screennot picked yet
warningIn 4 of 8 tests your browser handed back numbers that differ from the ones written into the file. A colour picker, including this one, reports what the browser decoded, which is usually what you see. To read the raw file values, a tool has to skip colour conversion, as the right-hand column does.
~/how-a-palette-is-chosen

Three ways to boil an image down to a few colours.

The palette above comes from k-means clustering. Here it runs three ways on your current image: Heckbert’s median cut, k-means on RGB numbers, and k-means in OKLab, a space where equal distances look roughly equally different. Each image is redrawn with only its palette, and the error is measured per pixel in ΔE OK (×100; about 2 is a just-visible difference).

Colours
Median cut · RGB30 ms
mean ΔE4.14
95th percentile8.55
Splits the colour box at the median of its widest channel until there are k boxes. Fast, deterministic, keeps rare colours, but boxes are ragged.
k-means · RGB36 ms
mean ΔE3.80
95th percentile8.75
Moves k centres to the mean of their pixels, measuring distance in raw RGB numbers. Over-spends colours on darks and under-spends on mid-tones.
k-means · OKLab42 ms
mean ΔE3.84
95th percentile8.72
The same, measuring distance in OKLab. Spends colours where the eye notices differences; often, but not always, the lowest error.
insightsWith 6 colours, k-means · RGB has the lowest average error: 3.801, against 3.842 for k-means · OKLab and 4.143 for Median cut · RGB. Average error falls as you add colours, but the 95th percentile shows the worst areas, usually smooth gradients, where banding appears first.
~/reference

Where colour numbers come from.

Two things decide the number a picker shows: which stage of the pipeline it reads from, and what colour information the file carries. App behaviour is from general knowledge of current versions; check their documentation before relying on it.

Pickers and what they read
This page (canvas)decoded fileReads the image after the browser has decoded it and converted it to sRGB. Display profile not applied.
EyeDropper APIscreenChromium only. Samples the screen after OS colour management and returns sRGB hex (or a color() string for wide gamut).
Chrome DevTools pickerscreenSame screen sampling as EyeDropper; can show the value in other CSS colour spaces.
macOS Digital Color Meterscreen, choice of spaceLets you choose native display values, sRGB, Display P3 or generic RGB, each gives different numbers for one pixel.
Windows PowerToys Color PickerscreenReads the composed screen pixel; results depend on HDR and colour-management settings.
Photoshop eyedropperdocument valuesReports values in the document’s own profile, with a sample size from point to 101 × 101 average.
Figma eyedroppercanvas valuesReads from the design canvas in the file’s colour space (sRGB or Display P3).
Colour information inside image files
PNGsRGB · gAMA · cHRM · iCCP · cICPcICP (2025) beats iCCP, then sRGB, then gAMA/cHRM. Tested live in the lab above.
JPEGAPP2 ICC_PROFILE (split into 64 KB markers)No profile means sRGB. Phone photos often embed Display P3.
WebPICCP chunk in the VP8X containerOnly in the extended format; simple WebP is sRGB.
AVIF / HEIFcolr box: nclx (CICP code points) or ICCnclx can signal BT.2020, PQ and HLG for HDR.
GIFnoneAlways treated as sRGB; 256-colour palettes per frame.
TIFFtag 34675 InterColorProfileCommon in print workflows with CMYK or Adobe RGB profiles.
SVG / CSScolor(display-p3 …), oklch(…)Colours carry their space in the syntax itself.
Timeline
1931The CIE defines the XYZ colour-matching functions, the basis of every colour space used here.
1976CIELAB is published as a roughly perceptually uniform space.
1982Heckbert presents median-cut colour quantisation for frame buffers at SIGGRAPH.
1982Lloyd’s 1957 k-means quantisation method is published in IEEE Transactions on Information Theory.
1993The International Color Consortium is founded to standardise colour profiles.
1996PNG 1.0 includes gAMA and cHRM chunks; HP and Microsoft propose sRGB.
1999IEC 61966-2-1 standardises sRGB.
2015Apple ships Display P3 screens on the iMac.
2020Björn Ottosson publishes OKLab.
2021The EyeDropper API ships in Chrome 95.
2023Chrome ships Display P3 canvases via the colorSpace option.
2025PNG Third Edition becomes a W3C Recommendation, adding cICP for HDR.