UseToolSuite UseToolSuite

Image Color Picker

Eyedropper tool that extracts colors from any image. Upload a PNG, JPG, or WebP, zoom to preview, click to pick, and get HEX, RGB, and HSL values.

Drop an image here or click to upload

PNG, JPG, GIF, WebP, SVG

Click on the image to pick colors and build a palette.

How sampling works

The picker loads your image into an HTML Canvas and reads raw RGBA values per pixel with getImageData(). Hover to preview, click to capture, and each pick is reported in HEX, RGB, and HSL. Because it’s reading the actual pixel bytes, accuracy comes down to which pixel you sample and what quality the source is.

Single pixel vs 3×3 average

Two sampling modes serve different needs:

ModeSamplesBest for
Single pixelOne exact pixelFlat graphics, UI, precise picks
3×3 averageA pixel + its 8 neighborsPhotos, compressed/dithered images

On a noisy JPEG or a photograph, a single pixel can be an outlier; averaging a 3×3 grid smooths out compression and anti-aliasing noise to give a color that better represents the area. On a clean flat graphic, single-pixel is exact.

Building a palette from an image

Click around the image and each color joins a palette strip with its HEX/RGB/HSL values, copyable individually or all at once — a fast way to lift a scheme from a photo, screenshot, or moodboard. To turn those sampled colors into harmonious variations (tints, shades, complementary), pass them to the Color Palette Generator; to convert a single value between formats, the Color Converter is the companion.

The CORS gotcha

If you try to load an image from another domain by URL, the Canvas becomes “tainted” and the browser blocks pixel reads for security (Cross-Origin Resource Sharing). The symptom is a “tainted canvas” error and no colors. The fix is simple: download the image to your device first, then upload it here — local files aren’t subject to the cross-origin restriction. Everything is processed in your browser, so the images you sample never leave your device.

Last updated Built and maintained by Necmeddin Cunedioglu How tools are tested

How helpful was this tool?

Click to rate

Key Concepts

Eyedropper

A color sampling tool that captures the exact color value of a pixel at the cursor position. Originally a physical tool in photography, the digital eyedropper reads pixel data from a rendered image and reports it in color formats like HEX, RGB, and HSL. Modern browsers support a native EyeDropper API, but it requires user gesture activation and is not available in all browsers.

Canvas API

A browser API for drawing and manipulating graphics using JavaScript. The Canvas 2D rendering context provides getImageData() to read raw pixel RGBA values from any rendered image. This tool uses the Canvas API to load uploaded images and extract per-pixel color data without any server-side processing.

Color Space

A specific organization of colors that defines the range (gamut) of colors that can be represented. sRGB is the standard color space for the web and most consumer displays. Wider gamut spaces like Display P3 (used by modern Apple devices) and Adobe RGB (used in print) can represent more saturated colors. The Canvas API operates in sRGB by default.

Anti-aliasing

A technique that smooths jagged edges in digital images by blending edge pixels with surrounding colors. This means that a pixel on the edge of a red shape on a white background might appear as a lighter shade of red (mixed with white). When using an eyedropper, anti-aliased edge pixels will not match the pure color of the shape — zoom in or use average sampling to get a more accurate color.

Frequently Asked Questions

What image formats are supported?

The tool supports all image formats that your browser can display: PNG, JPEG, GIF, WebP, SVG, BMP, and ICO. Images are loaded into an HTML Canvas element for pixel-level color extraction. There is no file size limit imposed by the tool — performance depends on your device's memory and the image dimensions.

Why does the picked color look slightly different from what I see on screen?

Several factors can cause color discrepancies: JPEG compression introduces color artifacts near edges, anti-aliasing blends pixels with surrounding colors, and your monitor's color profile may display colors differently from the raw pixel values. Use the 3×3 average mode to smooth out compression artifacts, or zoom in to identify the exact pixel you want to sample.

Can I pick colors from a screenshot or design mockup?

Yes. Take a screenshot, save it as PNG (for pixel-perfect accuracy) or JPEG, then upload it to the tool. PNG is preferred for UI screenshots because it uses lossless compression, preserving exact pixel colors. JPEG compression may alter colors slightly, especially in flat-color areas like UI elements.

How does the 3×3 average mode work?

When enabled, instead of sampling a single pixel, the tool averages the RGB values of the target pixel and its 8 immediate neighbors (a 3×3 grid). This reduces noise from compression artifacts, anti-aliasing, and dithering, giving you a more representative color of the area. It is especially useful for photographs and compressed images.

Can I build a complete color palette from an image?

Yes. Click on different areas of the image to pick multiple colors. Each picked color is added to the palette strip below the image with its HEX, RGB, and HSL values. You can copy all palette colors at once using the Copy All button, making it easy to transfer an entire color scheme to your CSS or design tool.

How do I pick a color from anywhere on my screen, not just an uploaded image?

Modern Chrome and Edge expose a native EyeDropper API that lets you sample any pixel anywhere on screen — another app, a video, a different tab — not just an image you've uploaded. You trigger it with a user gesture (a click), the cursor becomes a magnifier, and clicking returns the exact color under it. It's powerful but has limits: it requires a recent Chromium browser (Firefox and Safari don't support it yet), it only works on the current screen, and it must be invoked by a direct user action for security. When the API isn't available, uploading the image and sampling its pixels (what this tool does with Canvas) is the reliable cross-browser fallback.

Why doesn't a flat UI color match exactly when I pick it?

Three culprits, and they're usually not the tool's fault. (1) Anti-aliasing: edges of shapes and text are blended with the background, so a pixel near an edge is a mix, not the pure color — sample from the flat interior of a region. (2) JPEG compression: it introduces subtle color shifts and blocky artifacts, especially in flat-color areas, so the same UI swatch can vary pixel to pixel — use a PNG screenshot for pixel-perfect UI colors. (3) Your monitor's color profile and the image's embedded ICC profile can display the raw value differently than it's stored. The fixes: sample interior pixels, use 3×3 averaging to smooth artifacts, and prefer lossless PNG sources for exact UI colors.

Troubleshooting & Technical Tips

Canvas tainted by cross-origin data: Cannot pick colors

This error occurs when trying to load an image from a different domain directly via URL. Due to browser CORS (Cross-Origin Resource Sharing) security policies, the Canvas API cannot read pixel data from cross-origin images. Solution: download the image to your device first, then upload it to this tool using the file upload or drag-and-drop feature.

Colors appear washed out or incorrect on the canvas

This can happen if the image contains an embedded ICC color profile that the Canvas API does not fully support. The Canvas 2D context uses sRGB by default. Images in wider color spaces (Display P3, Adobe RGB) will be converted to sRGB, which may shift some colors. For color-critical work, use the original design file in your design tool instead of a rasterized export.

Picked color shows rgba(0, 0, 0, 0) on transparent areas

Transparent pixels in PNG or GIF images have an alpha value of 0, meaning the RGB values are undefined (often all zeros). The tool reports the actual pixel data including alpha. If you need to know what color the transparent area appears as in context, composite the image onto a known background color first, or use the surrounding opaque pixels as reference.

Related Tools

Embed this tool on your site

Paste this snippet into any HTML page or blog post to embed a live, fully working copy of Image Color Picker. Free for any use.