Image Color Lab

Hex color picker

Hex color picker from image

Get the exact hex code behind any pixel. Upload a screenshot, a logo or a photo, click the color you need, and copy the six-digit hexadecimal value along with RGB, HSL, CMYK and OKLCH.

Step 1 — add an image

Drop an image here

PNG, JPG, WebP, GIF or BMP. Nothing is uploaded — the file is decoded and drawn onto a canvas in this tab.

or press Ctrl / ⌘ + V to paste

A remote image needs the other site's CORS permission. If it is blocked, download the file and upload it instead.

Image

No image yet

Add one above to start picking colors.

Hover to preview, click to pin the color so it stays while you copy. Arrow keys nudge the pinned pixel by 1px, Shift + arrow by 10px, and a magnifier shows the exact pixel.

Picked color

Live preview—

#171717

Nearest name: —

rgb(23, 23, 23)

hsl(0 0% 9%)

cmyk(0% 0% 0% 91%)

oklch(20.5% 0 0)

Pick a pixel, then copy the code you need.

Your image never leaves your device — there is no upload step.

Palette from this image

Add an image and its dominant colors appear here — computed in this tab, never uploaded.

    Add an image to export its dominant colors.

    Recent picks

    Click a pixel to build a history. It stays in this browser and is never sent anywhere.

      Color vision preview

      How the picked color reads with common color vision deficiencies.

      Protanopia

      #171717

      Deuteranopia

      #171717

      Tritanopia

      #171717

      Tints, shades & harmonies

      Tints

      Shades

      Complementary

      Analogous

      Triadic

      How to get a hex code from an image

      A hex code is a six-digit hexadecimal value that starts with #, such as #2596be. It encodes red, green and blue in pairs, which is why the same color can also be written as rgb(37, 150, 190). Instead of matching a tone by eye, sample the exact pixel and copy the value that is already in the file.

      1. 1. Add the image — drag a file, choose one, paste a screenshot with Ctrl + V, or load an image URL.
      2. 2. Hover to preview the pixel; the magnifier and readout follow the pointer.
      3. 3. Click to pin the color, then press Copy HEX — the value stays put while you move to the button.

      Paste it into HTML or CSS

      The copied string works anywhere a CSS color is accepted:color: #2596be;,background-color: #2596be;, or inside a design tool's color field. If you need transparency, copy the RGB value and convert it to rgba(). The readout also names the nearest CSS color, which makes it easy to discuss a swatch with someone who does not read hex.

      Looking for a whole scheme instead of one value? Trythe palette generator, or use the color code converterwhen you already have a code and need the other formats.