Color Picker from Image
: Pick a color visually or from an image, then copy it as hex, rgb, hsl or oklch- hex
- #3b82f6
- rgb
- rgb(59 130 246)
- hsl
- hsl(217.2 91.2% 59.8%)
- oklch
- oklch(0.6231 0.188 259.81)
Color Picker from Image
Find a colour by eye on a saturation and value square, or read it off a pixel in your own image, and copy the result in the format your stylesheet wants. For a design you only have as a screenshot, the image section tells you what the colour actually is.
How to pick a color from an image
- Under
From image, drop a file anywhere on the page, pressOpen file, or paste a copied image with Ctrl+V or Cmd+V. A paste is ignored while the cursor is in a text field. - Move the pointer over the image. A small swatch shows the hex and position of the pixel underneath without changing your colour.
- Click or tap the pixel you want. The picker moves there, including the pixel's alpha, and the colour joins
Recent. - Adjust it if you need to: drag in the square, or use the
HueandAlphasliders. TheColourfield also takes typed values, and the swatch beside it opens your system's colour picker. - In
Formats, press the copy icon on one row, orCopy allfor every row (Ctrl+C copies them too while nothing is selected);Copy hexon thePickpane copies the hex value.
Example
The numbers behind one spot in the picker: this hue slider position, this point in the square and this alpha give the rows below.
hue: 217
saturation: 76
value: 96
alpha: 80hex #3b82f5cc
rgb rgb(59 130 245 / 0.8)
hsl hsl(217.1 90.3% 59.6% / 0.8)
oklch oklch(0.6224 0.1867 259.7 / 0.8)Details
- With the square focused, the arrow keys move saturation and value by 1, and Shift plus an arrow by 10. Left and right change saturation; up and down change value.
- The picker holds hue, saturation and value rather than red, green and blue. Dragging to the black or grey edge of the square keeps your hue, so you can drag back out and still have the same colour family.
- The
Colourfield takes hex,rgb(),hsl(),oklch()and CSS names, and says under it which format it read. An invalid value shows the reason under the field and leaves the picker where it was; theFormatsrows dim until the value reads again. - Below 100% alpha, hex gets 8 digits and the functions get a
/ 0.8part. Thecss namerow appears only when a fully opaque colour is exactly a named one, since a name cannot carry alpha. - The eyedropper button beside the
Colourfield samples anything on your screen, including other windows: click a pixel to take it, or press Esc to cancel. Recentcollects colours you copied or picked from an image, newest first, 12 at most. Dragging does not fill it. Click a swatch to go back to that colour.
Limits
- The eyedropper needs the EyeDropper API, which means Chrome or Edge. In Firefox and Safari the button is not shown; the image section still works there, so a screenshot is the way around it.
- Which image formats open depends on your browser, because it does the decoding. PNG, JPEG, GIF and WebP are the safe ones. If a file fails you get an error rather than a wrong colour; an SVG may not decode this way, and a HEIC usually needs converting first with HEIC to JPG. An animated file gives one frame.
- An image longer than 4096 px on its longest side is scaled down to fit, and a note says so. Scaled pixels are blended from their neighbours, so a colour read from one may not exist in the original. Below that size, opaque pixels are read as stored after the browser's conversion to sRGB.
- Translucent pixels can come back a few values off, because canvases store colour multiplied by alpha.
- Picking from the image needs a pointer. The image has no keyboard control; the square and sliders do.
Recentis held in memory only and goes on reload, along with the image.- It does not check contrast or build shade scales. Contrast Checker and Shade Generator do, and the line under the picker links to both.
FAQ
Is my image uploaded when I pick a color from it?
No. The file is decoded by your browser and drawn to a canvas on the page, and the pixel is read from that canvas. Clear on the From image pane empties it, and a reload discards it.
Why does the eyedropper give a different color than the image section?
The eyedropper reads your screen, after zoom, scaling and your display's colour handling. The image section reads the file's pixels. For the value stored in the file, use the image section.
How do I get an 8-digit hex with transparency?
Lower the Alpha slider. The hex row becomes 8 digits, with the last two holding alpha, so 50% ends in 80.
Runs entirely in your browser. Nothing is uploaded.