← Back to Tools Home | Olutil Image Tools
🌐 English

Replace Color in Image

Sample one colour from a photo, choose how close other pixels must be, and paint them with a new shade. Tolerance and soft-edge controls decide how far the replacement reaches and how gently it fades into the untouched areas, while a live readout tells you what share of the image was changed.

This is a colour-key tool for flat backgrounds, product backdrops and simple graphics rather than a full recolouring studio. All processing runs locally in your browser. Your data is not uploaded to any server. 100% Local

đŸŽ¯ Upload an image to replace a colour

How to Use Replace Color in Image

  1. Upload an image — click the drop box, drag a file in, or paste with Ctrl/⌘+V. JPG, PNG and WebP all decode in the browser.
  2. Click the area to replace — the eyedropper samples the exact pixel under your cursor and shows its HEX value in the kept-colour swatch.
  3. Start tolerance low, around 15–25%, so only pixels very close to the sampled shade are affected.
  4. Raise tolerance gradually until the flat background is fully covered, then stop before unrelated tones start to shift.
  5. Add edge softening between 10% and 40% so the boundary between replaced and kept pixels blends instead of showing a hard outline.
  6. Choose the replacement colour in the colour field and compare the two swatches before committing.
  7. Check the match readout: it reports the percentage of pixels replaced, which is a quick sanity check on whether the range is too wide.
  8. Pick PNG, JPG or WebP and download the result. The uploaded original is left untouched.

How tolerance and edge softening interact

Tolerance is a radius in RGB space: a pixel joins the replacement only if its distance from the sampled colour falls inside that radius. Soft edge blending then turns the outer slice of the radius into a gradient, so pixels just outside the core are mixed instead of switched. A hard edge with zero softening is right for logos and flat graphics, while a 20–40% blend hides the stair-stepped fringe that appears on photographs.

Choosing a replacement colour that looks natural

Matching the brightness of the original keeps the image believable; a much darker replacement flattens shadows and looks pasted on. Pull the replacement slightly towards the dominant light colour in the scene, and avoid pure saturated hues on large areas. For a white product backdrop, #F7F7F5 often reads better than #FFFFFF because it keeps a hint of shading instead of burning out.

Features

When to Use Replace Color in Image

Making a product background pure white

Catalogue rules often demand a clean white backdrop. Sample the grey studio wall behind the product, raise tolerance until the wall is uniform, add 20% edge softening to remove the fringe, and set the target to #FFFFFF. Products with reflective edges may still keep a thin grey line, which is a sign to lower tolerance rather than push it further.

Changing a garment or object colour

A single-colour garment, chair or phone case can be recoloured without touching the rest of the frame. Pick a mid-tone area rather than a shadowed fold, keep tolerance near 20%, and keep the replacement close in brightness. Folds and highlights stay darker or lighter, which is what makes the new colour look photographed rather than painted.

Recolouring a flat logo or icon

Brand assets exported as PNG often need a one-colour variant for dark or light backgrounds. Set tolerance to 0–5%, softening to 0, and replace the exact brand colour. Because the fill is flat, every pixel matches at once and the result stays perfectly crisp with no halo, which makes this the most reliable use of the tool.

Cleaning up a scanned form or screenshot

Scans and screenshots often carry an off-white or pale blue background that looks dirty in a document. Sample the background once, use a wide tolerance of 30–50% and a soft edge of 30%, then replace it with white. Text and lines keep their edges because they sit far outside the match radius, but faint anti-aliasing may need a second pass.

FAQ

Why is there a halo around objects after replacing a colour?

The halo is made of pixels that blend the object and the background, such as anti-aliased edges or JPEG noise. They sit outside the matched range, so they keep the old shade. Raise tolerance slightly and add soft-edge blending, or replace a colour that is further away from the object.

What does the tolerance percentage mean?

Tolerance is the radius around your picked colour, measured in RGB space and scaled so 0 percent matches only an exact value while 100 percent matches every pixel. Half of the range already covers most variations of a flat background, so start near 20 percent and increase only if patches remain.

Will colour replacement work on a JPEG full of noise?

It works, but JPEG compression scatters neighbouring shades across a range, so a flat wall may contain dozens of slightly different colours. A tolerance of 25 to 40 percent catches most of them. Expect some speckle on very noisy files; a PNG or a larger original behaves more predictably.

Can I replace several different colours at once?

One source colour is handled per pass. To change two colours, replace the first, download the result, then reopen that file and pick the second colour. Keep the first replacement in mind because the new file is the new starting point.

Is my photo uploaded anywhere?

No. The pixels are read into a canvas in your own browser and the replaced image is encoded there too. Nothing is sent to a server, which also means the tool keeps working on a plane or on a locked-down office network.

Related Tools