replace color in image

Replace color in image online

Replace one color family without uploading the picture to a server. Pick a source pixel from a logo, cartoon, icon, screenshot, or simple background; choose the new HEX color; inspect the live mask; and save a full-resolution PNG. The workflow is deterministic, private, and free to use without an account or watermark.

Tested in modern browsers · August 1, 2026

replace color in image

How do I replace one color in an image?

Upload a raster image, click the exact source color, enter the replacement color, and raise tolerance until all intended shades appear in the selection mask. Keep Preserve lightness on when the area contains highlights or shadows. Turn on transparency when you want to remove the chosen color instead. Review the result, then download a PNG; the original file remains unchanged on your device.

replace color in image

Why use this image color replacer?

The controls expose what is being selected and what will change, so a quick edit remains predictable instead of becoming an opaque AI request.

  • replace color in image

    Private from input to export

    File decoding, pixel sampling, matching, recoloring, previewing, and PNG creation happen with Canvas in the current browser tab. No image is sent to Toon Tone, no login is requested, and a refresh clears the working image.

  • replace color in image

    Keep highlights and shadows

    Preserve lightness transfers the new hue and saturation while retaining brightness differences found in the source. Flat fills change cleanly, while illustrated folds, glossy highlights, and soft shadows remain readable.

  • replace color in image

    See the selected pixels

    The mask view turns the chosen range white and everything else black. It reveals missed antialiasing, an over-wide tolerance, or unwanted background matches before you export the final PNG.

replace color in image

Replace a color in your image

Upload, click the color to target, tune the range, and export a PNG. Processing stays in this browser tab.

Local processing

replace color in image

PNG, JPG, WebP, GIF, AVIF or BMP · up to 12 MB · drag and drop or paste

replace color in image

Original image · Toon Tone sample

0 × 0

Click the original image to sample. Arrow keys move one pixel; Shift moves ten.

replace color in image

Color replacement controls

replace color in image

Matched pixels0 px0.0%

replace color in image

Edited image · Live result

replace color in image

replace color in image

A reliable four-step recoloring workflow

Start narrowly and expand the match only as far as the image requires. This prevents a source color shared by several objects from changing unexpectedly.

replace color in image

1. Load a suitable raster image

Choose PNG, JPEG, WebP, GIF, AVIF, or BMP up to 12 MB. The first frame of an animated image is edited. Large pictures are scaled to a 2400-pixel working edge so slider updates stay responsive; the displayed dimensions show the actual export size.

replace color in image

2. Sample the intended source

Click a representative middle tone inside the object, rather than an extreme highlight or dark outline. For precision, focus the original canvas and move the sample with arrow keys. Shift plus an arrow moves ten pixels at a time.

replace color in image

3. Tune tolerance and softness

Begin with low tolerance, switch to the selection mask, and increase the value until the desired color family is white. Edge softness creates a gradual blend outside that core range, reducing hard halos around antialiased edges.

replace color in image

4. Choose color or transparency

Enter any valid three- or six-digit HEX target and decide whether to preserve lightness. For background removal, enable transparency instead. Return to Result, check small details and download the edited pixels as a PNG.

replace color in image

Choose the right recoloring method

A single pixel rule is excellent for graphic assets, but it is not semantic object recognition. Match the method to the material in the source file.

When a range-based color replacement is appropriate
Image taskBest settingExpected resultWatch for
replace color in imageFlat logo or iconLow tolerance, low softnessCrisp fill replacementShared brand colors
replace color in imageCartoon clothing or propPreserve lightnessNew hue with retained shadingColored outlines
replace color in imageSimple backgroundTransparency and mask viewTransparent PNG areaSimilar foreground pixels
replace color in imagePhotographic objectNarrow range and careful reviewPartial tonal recolorTexture and reflected color

replace color in image

Quality check before downloading

Inspect the mask and final image at both normal size and close range. Six quick checks prevent most recoloring mistakes.

  1. replace color in imageConfirm that the sampled HEX comes from the object’s representative middle tone, not a highlight, outline, or transparent edge.
  2. replace color in imageStart with low tolerance and stop increasing it as soon as the complete intended area appears in the mask.
  3. replace color in imageLook for unrelated objects that share the source color, especially repeated brand colors and neutral backgrounds.
  4. replace color in imageCompare Preserve lightness on and off; choose the version that keeps detail without shifting the intended target too far.
  5. replace color in imageInspect softened edges for halos, partially transparent fringes, or isolated pixels that need a narrower range.
  6. replace color in imageDownload the PNG, reopen it on a contrasting background, and keep the untouched original as the source of truth.

replace color in image

Technical basis and measured limits

The editor uses documented browser pixel primitives and states its own implementation limits so the behavior can be reproduced.

  • replace color in imageCanvas ImageData exposes four one-byte values per pixel—red, green, blue, and alpha—so each channel in this tool is measured on the 0–255 range.
  • replace color in imageThe upload guard accepts supported raster files through 12 MB, and the working canvas limits its longest edge to 2400 pixels for interactive performance.
  • replace color in imageThe tolerance control spans 0–100, edge softness spans 0–30, and PNG export retains partial or full alpha created by transparent replacement.

replace color in image

MDN defines the pixel container directly: The ImageData object represents the underlying pixel data of an area of a canvas object.

replace color in image

Primary technical sources

replace color in image

Replace color in image FAQ

replace color in image

Does my image get uploaded?

No. The selected file is decoded and processed in the current browser tab with Canvas. The page has no image-upload step, account requirement, or cloud history for this tool. Your browser creates the downloadable PNG locally. As with any sensitive file, close or refresh the tab when finished and avoid unrelated browser extensions that can read page content.

replace color in image

Which image formats can I edit?

You can select PNG, JPEG, WebP, GIF, AVIF, or BMP files up to 12 MB when the browser supports decoding that format. For animated GIF or WebP input, the canvas captures a still frame rather than preserving animation. SVG is intentionally excluded because it is vector markup; edit its fill and stroke values in a vector editor instead.

replace color in image

Why did the replacement change another object?

The matcher compares pixel color values across the entire image and does not know which object a pixel belongs to. Two separate objects with similar RGB values can both fall inside the same tolerance. Lower tolerance, choose a more distinctive source pixel, or use a layer-based editor when selection must be restricted to one region.

replace color in image

How do I keep shadows after recoloring?

Enable Preserve lightness and sample a representative middle tone. The tool then applies the replacement hue and saturation while keeping each matched pixel’s relative lightness. Very neutral colors, strong reflections, or compressed photographs may still need lower tolerance. Toggle the option and compare the same area in the live result before downloading.

replace color in image

Can I make a background transparent?

Yes, when the background has a reasonably distinct color. Sample it, enable transparent replacement, inspect the mask, and use edge softness to retain smoother boundaries. Increase tolerance only until background variations are covered. If the foreground contains the same color, a global color range cannot separate it and a manual regional mask is safer.

replace color in image

Will the exported color be exactly my HEX value?

With Preserve lightness off, fully matched opaque pixels use the target RGB values exactly. With it on, hue and saturation follow the target while lightness varies to retain shading, so individual HEX values differ. Partially matched edge pixels are blended according to softness. The result preview is the same edited ImageData used to create the downloaded PNG.