Neatbo.

Extract image colors

Estimate a palette of HEX colors from one saved image.

Browser-local processingInputJPG / PNG / WebPOutputHEX palette / TXTUp to 20 MiB per file · File limit: 1
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

or drag and drop it here

Files stay on this device. Your originals stay unchanged.

.png · .jpg · .jpeg · .webp

Up to 20 MiB per file · File limit: 1

    Options

    Complete the required options first. You can keep the defaults for the rest.

    Enter a whole number from 2 to 12. The default is 6; a blank field also uses 6. Images with fewer distinct sampled colors may return fewer swatches.

    Ignore samples with alpha 0–127 (alpha runs from 0 for transparent to 255 for opaque). Values 128–255 are included. This is on by default. Turning it off includes all canvas samples; it does not change transparency or recover hidden RGB values.

    Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.⌘ / Ctrl + Enter to run

    Preparing the tool…

    Before you start

    Estimate a palette from a sampled version of one image. Weighted RGB clustering groups similar sampled colors into HEX swatches, with approximate shares for the pixels included in the analysis. Small accents and subtle differences can be missed.

    How to use this tool

    1. Choose one saved static JPEG, PNG or WebP image. The original stays on your device.
    2. Choose 2–12 colors and whether to ignore pixels with alpha below 128. Select “Extract colors”.
    3. Compare the swatches with your original image. Use “Copy result” or download palette.txt to keep the full HEX list, with one color per line. Percentages and the sample count are shown on the page; they are not included in the TXT file.

    Supported inputs and limits

    Static JPEG, PNG or WebP only; up to 20 MiB and 16 million pixels for one image. No animation or SVG.

    The browser must be able to decode the image and read its pixels through a 2D canvas. The input filename, including its extension, must fit within 512 UTF-16 code units; some emoji use two. Save a complete local copy and shorten an overlong name before selecting it.

    Request a whole number from 2 to 12 colors; the default is 6, and leaving the field empty uses 6. The returned palette can be smaller than requested. Colors and shares come from the sampled image, so gradients, transparency filtering and small details can affect the result. Compare the palette with the original before using it.

    Worked example

    Example input

    pixels.png
    Example options
    {
      "colors": 2
    }

    Example output

    #fe0001
    #0000ff

    When something does not work

    Check that the saved static JPG, PNG or WebP opens correctly and meets the byte, pixel and filename limits. Use a whole-number color count from 2 to 12, or leave it empty for 6. If transparency filtering excludes every sample, try turning it off or use a copy with visible colors. Extract again after changing the image or settings. A failed run clears the result; a rejected file choice, browser field-validation error or cancellation can leave the old palette visible. If copying fails, download palette.txt.

    Frequently asked questions

    Are my files uploaded?

    No. The image is decoded and sampled in your browser. Your saved image and settings may survive a move to another tool in the same tab, but this temporary workspace has time and memory limits. If an earlier palette is no longer retained, select the saved image and extract it again. Refreshing or closing the tab clears this state, so download palette.txt if you need to keep the colors.

    How accurate are the colors and percentages?

    These are estimates from a sampled canvas and groups of similar RGB values, not an exact inventory of the image’s pixels. Resampling can blend colors along edges, and a cluster’s HEX value may not exist in the original image. Percentages describe each group’s share of the samples included in the analysis. The displayed sample count covers the whole sampled canvas, including any pixels then filtered out. The displayed shares are rounded and need not add to exactly 100%. Browser color handling can change the result. Compare it in your intended app, and check brand colors, print requirements and foreground/background contrast separately.

    Why did I get fewer colors, or no palette?

    The requested count sets an upper bound, not a promise of that many swatches. There may be fewer distinct sampled RGB groups, and clusters with no assigned pixels are removed. A single-color image can return one swatch. With “Ignore transparent pixels” enabled, samples with alpha below 128 are skipped; if none remain, the run fails and clears the previous result. Try an image with visible colors, turn off that filter, or crop a separate copy around an area of interest and extract again. Cropping or requesting more colors may help reveal an accent, but cannot guarantee it.

    Documentation & further reading

    Related tools