Color Extractor

Image Color Picker Online

Drop or paste any image to extract its color palette, with each color's share and name. Get HEX, RGB, HSL and more. Hover to preview and click to pin exact pixel colors. Nothing leaves your device.

Last updated: October 2026

Drop any image to extract its colors

JPEG, PNG, WebP, AVIF, GIF, SVG, HEIC, TIFF. Or paste a screenshot with Ctrl+V. Your image never leaves this device.

Choose image

How to extract colors from an image

1

Drop or select your image

JPEG, PNG, WebP, AVIF, GIF, SVG, HEIC or TIFF. Nothing is uploaded.

2

Choose how many colors

Pick 3, 5, 6, 8, 10 or 12 for the extracted palette.

3

Review the palette

Swatches show HEX, RGB and HSL values and each color's share.

4

Or pick an exact pixel

Hover or use arrow keys, zoom in, click to pin a color.

5

Copy or export

Copy any value, export as CSS, Tailwind or JSON, share a link, or download a PNG swatch.

Who uses this tool

Brand designers

Extract a brand's exact colors from a logo or product photo. Get clean HEX codes to drop into Figma, Sketch or CSS.

Web developers

Copy CSS custom properties directly. Match a client's brand colors without guessing or sampling from screenshots.

Social media creators

Build a consistent color palette for feed posts and stories by extracting colors from your key brand image.

Interior designers

Extract colors from a mood board photo, fabric swatch or paint sample to build a cohesive room palette.

Photographers

Analyse the color mood of a shot. See the dominant tones to guide editing or to match across a series.

Print designers

Identify exact RGB values from a reference image before converting to CMYK for print production.

Getting colors right the first time

There's a specific kind of frustration that designers and developers know well. A client sends over a logo file, you zoom into it, try to eyedrop a color, and end up with three slightly different HEX codes depending on where you click and which tool you're using. Or you're building a website and trying to match the brand colors from a JPEG reference image, and every attempt feels slightly off. The image color picker exists to solve that exact problem.

Click a point on the image and the tool reads the actual pixel data from the full-resolution file, not a screenshot of it, not a compressed re-rendering. For ordinary sRGB images, which covers most web graphics and screenshots, the HEX code matches what you'd get by sampling the same file in Photoshop or Figma. Photos saved with a wide-gamut color profile, such as Display P3, are converted to sRGB by the browser, so their values can differ slightly from an editor that works in the original color space.

How the palette extraction actually works

A typical photograph contains hundreds of thousands of distinct colors. Showing all of them would be useless. What you actually want is a small set of the colors that define the visual character of the image. The tool counts every pixel and groups similar colors in Oklab, a color space where the distance between two colors matches how different they look, so colors that look the same merge and colors that look different stay apart. Think of it like sorting a pile of thousands of colored marbles into groups by shade, then picking the most representative marble from each group. For logos and other flat graphics, the tool reports the exact colors used and ignores the blended pixels that smooth edges create. Every swatch shows its share of the image, and only transparent pixels are left out.

You can extract 3, 5, 6, 8, 10 or 12 colors depending on what you need. For a brand logo or a product with a clean background, three to five colors is usually the right call. For a landscape photo or a complex illustration where you're trying to understand the full tonal range, eight to twelve gives you a more complete picture.

Picking exact pixel colors vs extracting a palette

These are two different things and they're useful in different situations. Palette extraction tells you what the dominant colors are across the whole image and how much of it each one covers. Pixel picking tells you the exact color value at a specific point, read from the full-resolution image, and you can pin up to 8 of these at once. If you're matching a button color to a logo, you want pixel picking, click directly on the part of the logo you're matching and you'll get the exact HEX code for that point. If you're building a color scheme inspired by a photo, palette extraction is what you want.

Taking your colors into CSS

Once you've got the palette you want, the CSS export button outputs the colors as custom properties that you can paste directly into your stylesheet, named in palette order. Something like --color-1: #2D4A8C; /* rgb(45, 74, 140) | hsl(220, 51%, 36%) */ ready to drop in and rename to something more descriptive if you want. This saves the copy-paste-reformat cycle that eats up time when you're manually transferring colors from a design tool into code. The same buttons copy a plain HEX list, SCSS variables, a Tailwind CSS theme block or JSON, and for design apps you can download an ASE file for Photoshop and Illustrator or a GPL palette for GIMP and Inkscape. If you need the palette as a visual reference rather than code, the PNG download gives you a swatch image you can drop into a Figma file, a mood board, or a client presentation.

Get colors from a screenshot

Want a color from a website, an app or a video? Take a screenshot and paste it straight into the tool, with no file to save first. To read just one part, such as a button, choose Select area and drag a box over it.

Windows

Press Windows logo key + Shift + S and drag over the part you want. Come back to this page and press Ctrl+V. If nothing appears, open the snip in Snipping Tool, press Ctrl+C, then paste again.

Mac

Press Control + Shift + Command + 4 and drag over the area. Holding Control copies the screenshot instead of saving it as a file. Then press Command + V on this page.

iPhone and Android

Take a screenshot as usual, then tap Choose image here and pick it from your photos. iPhone photos in HEIC format open too. Tap the image to pin a color, and zoom in for small details.

Shortcuts from Microsoft and Apple.

HEX, RGB, HSL, HSV, CMYK or OKLCH?

All six describe the same color in different ways. Here is the red #E63946 in each, and where each one is used.

Format#E63946 asUse it for
HEX#E63946Websites, CSS, Figma and most design apps. The most common way to share a color.
RGBrgb(230, 57, 70)CSS and code that works with red, green and blue values from 0 to 255.
HSLhsl(355, 78%, 56%)CSS, when you want to adjust lightness or saturation by hand.
HSV (HSB)hsv(355, 75%, 90%)The color pickers in Photoshop, Figma and other design apps.
CMYKcmyk(0%, 75%, 70%, 10%)A rough starting point for print. Printers convert with a color profile, so take final values from your design app.
OKLCHoklch(61.2% 0.208 22.2)Modern CSS. Its lightness follows how bright colors look, which helps when building tints and shades.

Each color also shows the nearest CSS color name, such as crimson for this red. The ≈ sign means it's the closest name rather than an exact match, which is handy for describing a color in words.

Already have a color code? The Color Converter turns any format into the others, with CMYK for a chosen printing condition instead of the simple conversion here.

Why a picked color can look different

Photos with a wide color profile

Some phone and camera photos use a wider color space than sRGB, such as Display P3. Browsers convert them to sRGB, the space HEX codes and CSS colors use, so very vivid colors can come out slightly less saturated than in an editor that keeps the original space.

Noise and compression in photos

Neighboring pixels in a JPEG photo often differ by a few values because of sensor noise and compression. Set Sample to 3x3 or 5x5 to average a small area, which gives a steadier color than a single pixel.

Edges of logos and text

Smooth edges blend a shape's color with the background, so a pixel on the edge is a mix of both. Pick from the middle of the shape, or use the palette, which reports a logo's real colors and ignores those blends.

Your screen

Brightness, night mode and display calibration change how a color looks, but not its code. The same HEX code can look different on two screens.

Transparent pixels

Semi-transparent pixels are read as their color without the transparency, so a faded edge on a transparent PNG shows its full-strength color. Fully transparent pixels are left out of the palette.

Common color extraction mistakes

Reading a photo's palette as exact pixel colors

For photos, each swatch is the average of a group of similar colors, so it may not match any single pixel exactly. To get the exact color of one spot, click that spot on the image instead.

Asking for more colors than the image has

A logo with three colors gives three swatches even if you ask for twelve. The tool shows only the colors that are really there instead of padding the palette with near-duplicates.

Only pinning one color at a time

You can pin up to 8 colors by clicking different points on the image. Clicking a pinned color again removes it. No need to screenshot or note down colors one at a time.

Expecting the All colors list to show every edge shade

Smooth edges in logos and text create many slightly different blended colors. All colors hides the ones under 0.1% of the image by default; untick the box to see them all.

Expecting the CSS export to use semantic names

The exported CSS variables are named --color-1, --color-2 and so on in palette order, not by role like --color-primary. Rename them in your stylesheet if you want more descriptive names.

Why use ImgTweak?

Runs entirely in your browser
No uploads, ever
Pin up to 8 exact pixel colors
Free forever, no account needed
Works on mobile as well as desktop
Never modifies or resaves your original image

Frequently asked questions

How does the color extraction work?

The tool counts every pixel of your image in your browser and groups similar colors in Oklab, a color space designed so that distances match how different two colors look. Colors that look the same are merged and clearly different colors stay separate. For logos and other flat graphics it returns the exact colors used and ignores the blended pixels along smooth edges; for photos each swatch is the average of a group of similar colors. Every swatch shows its share of the image, and your image is never sent to a server.

Does the palette include every color in my image, even white and black?

Yes. White, black and gray count like any other color, and each swatch shows how much of the image it covers, so a black logo on a white background gives black and white. Only transparent pixels are left out. To see every exact color rather than just the main ones, open the All colors tab, which lists each color in a logo, icon or graphic with its share.

What color formats are shown?

HEX (for CSS and web, in upper or lower case, with or without #), RGB, HSL, HSV (the HSB values Photoshop and Figma show), CMYK and OKLCH. CMYK is a simple conversion without a print profile, so use it only as a starting point for print. Each color also shows the nearest CSS color name. Click any value to copy it.

Can I pick a specific color from the image?

Yes. Hover over or touch the uploaded image and a magnifying loupe shows a live preview of the color under your pointer or finger. Pixel picking reads the exact pixel from the full-resolution image. Zoom in up to 8x for small details, use the arrow keys to move one pixel at a time, and switch the sample to 3x3 or 5x5 to average out noise in photos.

Can I pick more than one color at a time?

Yes. Clicking a point on the image pins that color to a list below, up to 8 at once. Clicking the same color again removes it. This is useful for building a small palette from specific spots in a photo rather than relying on automatic extraction.

Can I get the colors of just part of an image?

Yes. Choose Select area and drag a box over the part you want, such as a button in a screenshot or a product in a photo. The palette and the All colors list then cover only that area. Use the whole image again with one click.

Can I paste a screenshot?

Yes. Take a screenshot or copy an image, then press Ctrl+V (Cmd+V on a Mac) anywhere on the page, or use the Paste image button. The image is read in your browser like any other file.

How do I find a color code on my iPhone or Android phone?

Open this page in your phone's browser, tap Choose image and pick the photo or screenshot from your library; iPhone HEIC photos work. Tap the image to pin a color and read its HEX code, zoom in for small details, or use Select area to get the colors of one part.

Why is the picked color different from what I see?

Usually because of the photo, not the picker. Wide-gamut photos are converted to sRGB, the color space HEX codes use; photo noise makes single pixels vary, which the 3x3 or 5x5 sample smooths out; and edge pixels are blends of two colors. Screens also show the same code differently depending on brightness and calibration.

Can I find the name of a color?

Each color shows the nearest of the 148 CSS named colors, such as steelblue or crimson, marked with ≈ when it's a close match rather than exact. That's handy for describing a color; for an exact value use the HEX code.

Can I remove colors from the palette or add my own?

Yes. Remove any swatch with its x button, and add pinned colors with + Palette or Add all to palette. Exports and downloads use the palette as shown, and Reset palette brings back the original.

Can I pick a color from anywhere on my screen?

In Chrome and Edge on a computer, yes. Press Pick from screen, then click any point on your screen, even outside the browser, and the color is pinned with its codes. It uses the browser's own color picker, which Safari, Firefox and phone browsers don't offer yet, so the button only appears where it works.

Can I check color contrast?

Yes. The contrast check takes any two colors from your palette, your pinned colors, white or black, shows a text sample and gives the WCAG 2.2 contrast ratio with AA and AAA results for normal and large text. Ratios are never rounded up, so 4.49:1 fails the 4.5:1 level.

Can I share a palette or come back to it later?

Yes. Copy palette link puts the colors in the link itself, after the # sign, which browsers don't send to any server; whoever opens it sees the palette with all formats and exports. Your recent palettes are also kept in this browser's storage, so they're here next time. They never leave your device, and you can remove them at any time.

How many colors can I extract?

You can choose 3, 5, 6, 8, 10 or 12 colors using the palette size buttons. Smaller palettes work well for branding and logos. Larger palettes are better for complex photographs. If the image has fewer main colors than you ask for, the palette shows only those instead of near-duplicates.

Can I export the palette?

Yes. Copy the full palette as a plain HEX list, as CSS custom properties named --color-1, --color-2 and so on with the RGB and HSL values noted alongside each, as SCSS variables, as a Tailwind CSS theme block or as JSON with each color's share. You can also download it as a PNG or SVG swatch sheet, an ASE file for Adobe apps or a GPL palette for GIMP and Inkscape. Exports use the palette as shown, so remove colors or add your pinned picks first if you like.

Will this modify or resave my original image?

No. This tool only reads pixel color data, it never edits, resizes or re-saves your original file. The only file it can produce is the optional PNG swatch of your extracted palette.

Can I extract colors from a HEIC photo?

Yes. HEIC photos from iPhones open directly. Safari displays them natively, and in other browsers a decoder built into the page opens them, so the photo still never leaves your device.

Can I extract colors from an SVG file?

Yes, SVG is one of the accepted formats here and renders directly in the browser for both palette extraction and pixel picking.

Is my image uploaded anywhere?

No. Your image never leaves your device. All color extraction and pixel picking happen entirely in your browser, and nothing is sent to a server. Recent palettes are saved only in your browser's storage.

Can I compress or resize an image using this tool?

No, this page is for color extraction only. Use the resize or compress tools separately if you also need to change an image's dimensions or file size.

Ready to extract your palette?

No sign-up. No uploads. Drop your image above and get HEX, RGB and HSL codes in seconds.