Submit an extension

↑↓ move · ↵ open · Tab filter · Esc close

Free tool · Website inspector

Color picker from image

Drop, paste or upload an image, then click any pixel to get its HEX, RGB, HSL and OKLCH codes. A loupe shows the exact pixel. Nothing is uploaded.

  • Free, no sign-up
  • Runs in your browser
  • Works on mobile

The screen picker uses the EyeDropper API, which works in Chrome, Edge and Opera on desktop. It can pick any pixel on your screen, even outside this tab.

No image yet. Add one above, or type a colour below to convert it.

Current colour

HEX, RGB, HSL, OKLCH or a CSS name such as tomato. Press Enter to save it.

  • HEX #1E90FF
  • RGB rgb(30, 144, 255)
  • HSL hsl(209.6, 100%, 55.9%)
  • OKLCH oklch(0.652 0.19 253.2)
  • CMYK ≈ cmyk(88%, 44%, 0%, 0%)

CMYK is an approximation. Real print values depend on the printer's colour profile.

WCAG contrast check
Aa White text 3.23:1 Large text only
Aa Black text 6.48:1 Passes AA

WCAG 2.2 needs 4.5:1 for body text (AA), 3:1 for large text and UI parts, 7:1 for AAA.

Picked colours

0 colours

Nothing picked yet. Every colour you pick lands here. The list lasts for this visit only and is never saved or sent anywhere.

    Export palette as
    /* Pick colours to build a palette */

    To use this color picker from image, drop a picture or paste a screenshot with Ctrl+V, then click the spot you want. A magnified loupe shows the exact pixel, and you get its HEX, RGB, HSL, OKLCH and approximate CMYK codes with copy buttons, a contrast check and an automatic palette. The image never leaves your browser.

    Last checked · Independent, not affiliated with Google

    Your data Your image is decoded and read entirely inside this browser tab using the built-in canvas. No image, pixel or colour value is sent to our server or anyone else's. Picked colours live only in this tab's memory and disappear when you close it. The Pick from screen button uses your browser's own eyedropper, which only returns the one colour you click.

    How to use the Color Picker from Image

    1. Add an image

      Drop an image on the box, click it to choose a file, or copy a screenshot and press Ctrl+V (⌘+V on Mac). No image handy? Press Try a sample image.

    2. Aim with the loupe

      Move your pointer over the picture. The loupe magnifies an 11×11 pixel grid so you can hit a thin line or a single pixel. On a phone, drag your finger and let go.

    3. Click to pick

      Click or tap to pick. Choose 3×3 or 5×5 sampling to average out noise in photos. On a keyboard, focus the image, use the arrow keys, then press Enter.

    4. Copy or export

      Copy any format with one click, check contrast against white and black, and export every colour you picked as CSS variables, JSON or a plain list.

    How does this color picker from image work?

    This color picker from image draws your picture onto a canvas inside the page and reads the red, green and blue value of the pixel you click. Your browser does the reading, so nothing is uploaded.

    The loupe magnifies the pixels around your pointer. The outlined square is what gets sampled: one pixel, or the average of a 3×3 or 5×5 block.
    • Decode: your browser's own image decoder opens PNG, JPG, WebP, GIF, AVIF, BMP and SVG files.
    • Read: the pixels are copied once into memory with the canvas getImageData() method, so every hover and click is instant.
    • Magnify: the loupe redraws the 11×11 pixels around your pointer at 12 times their size, with a grid, so you can see exactly which pixel you are on.
    • Convert: the picked RGB value is converted to HEX, HSL, OKLCH and CMYK with the formulas in the CSS Color Module Level 4 specification.

    The sample size switch matters most for photos. A single pixel in a JPG is often a little off from its neighbours because of compression. Averaging 3×3 or 5×5 pixels gives the colour your eye actually sees. For flat graphics, logos and UI screenshots, keep it on 1 px so you get the exact value.

    How to get the hex code from a screenshot

    Take a screenshot to your clipboard, press Ctrl+V (⌘+V on Mac) on this page, then click the colour. You don't need to save a file first. This is the quickest answer to how to get hex code from a screenshot, and it works for apps, videos and PDFs as well as web pages.

    1. Windows: press Win+Shift+S, drag over the area, and the capture goes to your clipboard.
    2. Mac: press Ctrl+Cmd+Shift+4 and drag. Holding Ctrl sends the capture to the clipboard instead of the desktop.
    3. Chromebook: press Ctrl+Shift+Show windows, select an area, and the screenshot is copied automatically.
    4. Come back to this tab and press Ctrl+V or ⌘+V. The screenshot appears in the picker.
    5. Hover to find the spot, click, and press Copy next to HEX.

    HEX, RGB, HSL, OKLCH or CMYK: which colour code do you need?

    Use HEX for most web and design work, RGB when code asks for separate channel numbers, HSL when you want to lighten or darken by hand, and OKLCH for modern CSS palettes. CMYK is only a rough guide for print. Every format describes the same colour, so pick whichever the tool you paste into expects.

    Colour code formats this picker shows
    FormatExampleBest for
    HEX#1E90FFCSS, Figma, Canva, brand guides
    RGBrgb(30, 144, 255)Code, Photoshop, video tools
    HSLhsl(209.6, 100%, 55.9%)Making lighter or darker shades
    OKLCHoklch(0.652 0.19 253.2)Modern CSS with even lightness steps
    CMYK ≈cmyk(88%, 44%, 0%, 0%)A starting point for print only

    OKLCH is newer. Its first number is perceived lightness, so two OKLCH colours with the same L look equally bright, which HSL can't promise. All current browsers support it in CSS. The CMYK value is a plain mathematical conversion; real print colours depend on the paper and the printer's colour profile, so ask your printer before you rely on it.

    :root {
      --brand: #1E90FF;                     /* HEX */
      --brand-rgb: rgb(30 144 255);         /* RGB, modern syntax */
      --brand-soft: hsl(209.6 100% 85%);    /* same hue, lighter */
      --brand-ok: oklch(0.652 0.19 253.2); /* OKLCH */
    }

    How to convert HEX to RGB and RGB to HEX

    A hex code is three two-digit base-16 numbers, one each for red, green and blue. To convert hex to RGB, turn each pair into a number from 0 to 255. To go from RGB to hex, do the reverse. Type any code into the Type or paste a colour box above and every format updates at once.

    #1E90FF splits into 1E, 90 and FF. Each pair is a base-16 number: 1E is 30, 90 is 144 and FF is 255.

    Three-digit codes such as #F80 are shorthand: each digit is doubled, so #F80 means #FF8800. Eight-digit codes add a fourth pair for transparency, so #1E90FF80 is the same blue at about 50% opacity. The converter accepts all of these, plus rgb(), hsl(), oklch() and CSS colour names like tomato.

    // hex to rgb
    const hex = "1E90FF";
    const [r, g, b] = [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16)); // 30, 144, 255
    
    // rgb to hex
    const toHex = (...c) => "#" + c.map((v) => v.toString(16).padStart(2, "0")).join("").toUpperCase();
    toHex(30, 144, 255); // "#1E90FF"

    How to use the eyedropper in Chrome

    In Chrome, Edge or Opera on a computer, press Pick from screen above, then click any pixel on your screen, even outside the browser. Press Esc to cancel. This button uses the EyeDropper API, a built-in browser feature, so it works as an eyedropper tool online with nothing to install.

    Where it works
    Chromium browsers on desktop: Chrome and Edge since version 95, and Opera. Firefox, Safari and all phone browsers don't support it yet, so the button stays disabled there and says why.
    What it can see
    Only the one colour you click. The page gets back a single sRGB value, not a screenshot, and the browser only opens the eyedropper after you press a button.
    Chrome DevTools
    Developers have another eyedropper: open DevTools, click any colour swatch in the Styles pane, then the eyedropper icon in the colour picker that opens.

    Image color picker vs Google color picker vs extensions

    Google's colour picker, the widget that appears when you search "color picker", is a colour mixer: you drag sliders to make a colour and read its codes. It can't read a colour out of an image. An image color picker starts from your picture; an extension reads colours from live web pages.

    Ways to get a colour code compared
    ToolReads imagesReads other appsPalette exportInstall
    This pageYes, with loupeVia screenshot or Pick from screenCSS, JSON, listNone
    Google color pickerNoNoNoNone
    Chrome DevToolsOnly CSS on the pageNoNoBuilt in
    Eyedropper extensionWeb pagesVaries by extensionVariesChrome Web Store

    For a logo file, a product photo or a screenshot from Slack, a color picker from image like this one is the fastest color picker online. If you design for the web all day, add an extension too; our design tools for designers page lists the ones worth keeping, and a font finder extension such as WhatFont pairs well for matching a site's typography.

    How to find the color code of an image automatically

    You don't always need to pick color from image pixels by hand. Load the image and look at Dominant colours in this image: the picker lists its 5 to 8 main colours with their share of the picture. Click any swatch to get its codes, or Add all to picked to export the whole set as a palette.

    The palette uses median cut, a classic colour quantisation method. It sorts a sample of the pixels by their widest colour channel, splits the group at the median, and repeats until it has many small groups. Groups that look almost the same are merged. The final swatches balance how much of the image a colour covers against how different it is from colours already chosen, so a small red button isn't lost behind five shades of sky.

    Check colour contrast against WCAG 2.2

    Every colour you get from the color picker from image is checked against white and black text using the WCAG 2.2 contrast formula. Body text needs at least 4.5:1 to pass level AA. Large text and UI parts such as icons and input borders need 3:1, and AAA needs 7:1.

    WCAG 2.2 contrast thresholds
    RequirementMinimum ratioWCAG criterion
    Normal text, AA4.5:11.4.3
    Large text, AA3:11.4.3
    Normal text, AAA7:11.4.6
    Large text, AAA4.5:11.4.6
    Icons, borders, focus rings3:11.4.11

    Large text means at least 18 point regular or 14 point bold, roughly 24 px and 18.66 px. If a colour fails, try the other text colour or darken it and recheck.

    Why a picked colour can differ from the original

    A color picker from image reports the exact pixel values in the file, but the file may already differ from the colour you expected. Four things cause most mismatches:

    • Compression: JPG and lossy WebP shift pixels slightly. Use 3×3 or 5×5 sampling, or ask for the original PNG or SVG. Our WebP to PNG converter and SVG to PNG converter help when a file won't open.
    • Colour profiles: phone photos often use Display P3, which the browser converts to sRGB, so very saturated colours can shift.
    • Anti-aliasing: edges of text and shapes blend into the background. Zoom in with the loupe and pick from the middle of a shape.
    • Scaled screenshots: on a high-density screen a capture may be scaled, blending neighbouring pixels. Very large images (over 24 megapixels) are read from a smaller copy, and the picker tells you when it does this.

    Checking a thumbnail's colours before you upload it? The YouTube thumbnail checker previews it at real sizes.

    Prefer it in your toolbar?

    This page works in any browser. If you do this every day, a Chrome extension puts it one click away. These are the picks we'd start with.

    1. ColorZilla

      Eyedropper and color picker for any pixel.

      Free Design ✓ No account needed

    Best color picker Chrome extensions

    Color Picker from Image: FAQs

    How do I use a color picker from an image?

    Drop or paste the image into the color picker from image above, hover to magnify, and click the spot you want. You instantly get its HEX, RGB, HSL, OKLCH and approximate CMYK codes, each with a copy button. It is free, needs no sign-up and works on phones.

    How do I find the color code of an image?

    Open the image in this picker and click the colour, or read the automatic palette of its 5 to 8 dominant colours. Each swatch shows its hex code and share of the image. Click one to see every format and a contrast check.

    How do I get the hex code from a screenshot?

    Copy the screenshot to your clipboard (Win+Shift+S on Windows, Ctrl+Cmd+Shift+4 on Mac), press Ctrl+V or ⌘+V on this page, then click the colour. The hex code appears at once with a Copy button, and you never have to save the screenshot as a file.

    Is this image color picker private?

    Yes. This color picker from image never uploads anything: the image is read inside your browser with the canvas API. Picked colours stay in this tab's memory only, and closing the tab clears them. Safe for unreleased designs.

    How do I use the eyedropper in Chrome?

    On desktop Chrome, press Pick from screen on this page and click any pixel on your screen, even outside the browser. It uses Chrome's built-in EyeDropper API. Developers can also open DevTools, click a colour swatch in the Styles pane and use its eyedropper icon.

    Is there an eyedropper tool online that picks from my whole screen?

    Yes, in Chrome, Edge and Opera on a computer. The Pick from screen button opens the browser's eyedropper, which can pick any pixel on your screen. Elsewhere, paste a screenshot instead.

    How do I convert hex to RGB?

    Split the hex code into three pairs and convert each from base 16 to a number from 0 to 255: #1E90FF becomes 1E = 30, 90 = 144 and FF = 255, so rgb(30, 144, 255). Or type it into the converter above.

    How do I convert RGB to hex?

    Convert each channel to a two-digit base-16 number and join them after a #: rgb(255, 99, 71) becomes FF, 63 and 47, so #FF6347. Paste any rgb() value into the box above and the hex code updates instantly.

    Is this a hex color picker as well?

    Yes. Besides picking from images, you can type or paste any colour, or open your system colour chooser with the swatch button, and get HEX, RGB, HSL and OKLCH codes. That makes it a color picker with hex codes for building palettes from scratch too.

    Can I use it as an HTML color picker with hex codes?

    Yes. Every colour shows a hex code you can paste straight into HTML or CSS, such as color: #1E90FF. Export your picked colours as CSS custom properties and paste the whole palette into a stylesheet in one go.

    How is this different from the Google color picker?

    The Google color picker, shown when you search "color picker", only mixes colours with sliders. It can't read a colour from an image or screenshot. This page picks real pixels from your images, extracts a palette and checks WCAG contrast.

    Does the photo color picker work on iPhone and Android?

    Yes. Tap the drop box to choose a photo, then drag your finger over the image. A loupe appears above your finger, and lifting it picks the colour. The screen-wide eyedropper isn't available on phones, so pick from photos or screenshots.

    Why does the picked colour look slightly different from the original?

    Usually because of compression, a colour profile or anti-aliased edges in the image file. Switch to 3×3 or 5×5 sampling to average out JPG noise, and pick from the middle of a shape rather than its edge.

    Is a color picker from image better than an extension?

    For images and screenshots, yes. For live web pages, an extension is quicker. ColorZilla is the long-standing free choice: an eyedropper, colour history and gradient generator right in your toolbar.

    Sources and further reading