What is colour replacement?
Colour replacement swaps one colour in a photo for another: every pixel close to the target colour becomes the replacement colour, and every other pixel stays exactly as it was. A red shirt becomes green, a blue sky becomes orange, a white background becomes transparent-looking black — without touching anything else in the picture. The tool runs entirely in your browser — nothing is uploaded.
The effect is the digital version of re-dyeing: the shape stays, the colour changes. A product photo with the wrong colour variant, a logo on the wrong background, or a portrait with a distracting red object can all be fixed by replacing one colour instead of re-shooting the photo. The rest of the image is untouched, so the fix is invisible when it works well.
Colour replacement is not a filter. A filter changes every pixel; replacement changes only the pixels near the target. A photo with a small red detail and a large blue sky can have the red changed while the sky stays blue, because the tool measures each pixel's distance from the target and only acts on the close ones.
How colour replacement works: distance in RGB
Each pixel's distance from the target colour is measured in RGB space: the square root of the squared differences in red, green, and blue. A pixel of 250, 10, 10 against a target of 255, 0, 0 has differences of 5, 10, and 10, so the distance is the square root of 25 plus 100 plus 100, which is the square root of 225, or 15. That is well within the default tolerance of 32, so the pixel is replaced.
A pixel of 200, 50, 50 against the same target has differences of 55, 50, and 50, so the distance is the square root of 3025 plus 2500 plus 2500, which is the square root of 8025, or about 89.6. That is beyond the tolerance of 32, so the pixel is left alone. The distance is a straight line in colour space: the further a pixel is from the target, the less likely it is to be replaced.
The replacement is exact: a replaced pixel takes the replacement colour's red, green, and blue values, with no blending. That gives clean, flat areas of the new colour, which is what you want for a product shot or a logo. The trade-off is a hard edge where replaced pixels meet untouched ones, which is why the tolerance matters so much.
The tolerance slider, and what it does
The tolerance slider sets how far from the target a pixel can be and still be replaced, from 0 to 200. At 0, only pixels exactly equal to the target change — a single precise colour. At 200, pixels up to 200 units away change, which covers a wide range of shades. The default of 32 catches a colour and its near neighbours: the main shade plus its shadows and highlights, but not other colours.
Low tolerances, from 5 to 20, suit flat digital art: a logo, an icon, or a screenshot, where the colour is one exact value. High tolerances, from 50 to 100, suit photos, where a real colour is never one value — a red shirt has highlights, shadows, and folds, each a slightly different red. The slider is live, so you can drag it and watch the replacement spread until it covers the whole object without spilling onto the background.
The tolerance also controls the download. The file you save is the photo at the tolerance shown, at the original size, in the same format it arrived in. The preview on the page is the same image, so what you see is what you download.
A worked example: one red shirt, then a whole photo
Take a photo of a red shirt on a blue background. The target is red, #FF0000, the replacement is green, #00FF00, and the tolerance is 32. A shirt pixel of 250, 10, 10 is 15 units from the target, so it becomes green, 0, 255, 0. A fold in the shirt at 200, 50, 50 is about 89.6 units away, so it stays red. At tolerance 32, the flat parts of the shirt turn green and the deep folds stay red — the shirt looks patched.
Now raise the tolerance to 100. The fold at 89.6 units is now within range, so it turns green too. The whole shirt becomes green, including its folds and shadows. But a pinkish skin tone at 220, 120, 110 is about 148 units from red — still outside 100 — so the skin is safe. Raise the tolerance to 160 and the skin starts to turn green as well. The right tolerance is the smallest one that covers the whole object.
Take a whole photo, 1920 by 1080 pixels. The tool reports its size as 1920 × 1080, an aspect ratio of 16:9, 2.1 megapixels, and an uncompressed size of 5.93 MB. Those numbers describe the photo itself: replacement changes the colour values, not the dimensions. A smaller photo, 800 by 600, is 4:3, 0.5 megapixels, and 1.37 MB uncompressed.
Who replaces colours, and why
Online sellers are the biggest users. A product that comes in six colours needs six photos, but a seller with one photo can replace the colour five times and have all six. A red mug becomes blue, green, yellow, black, and white in minutes, without a new photo shoot. The shape, the lighting, and the shadows stay identical, which is exactly what a shopper expects from colour variants.
Designers use it to fix a clash. A logo that is red on a red background, a chart with two slices too close in colour, or a photo where the subject blends into the background can all be fixed by replacing one colour. The fix is faster than re-drawing, and it keeps the rest of the design intact.
Social media users use it for fun: a blue car becomes pink, a green lawn becomes purple, a white cat becomes orange. The effect is simple enough to try on any photo, and the result is striking enough to share. It is the same idea as a colour-swap filter in a phone app, without the app.
Colour replacement vs hue shift vs repainting
Colour replacement, hue shift, and repainting all change a colour, but they work differently. A hue tool rotates every colour in the photo by the same amount: red becomes green, but so does everything else. Replacement changes one colour and leaves the rest alone. Repainting, by hand in an editor, changes exactly the pixels you brush, with full control but much more work.
If one colour is wrong and the rest is right, replacement is the right tool. If the whole photo's colours need to shift together, a hue tool is better. If the area to change is a complex shape with no single colour, repainting by hand is the only honest option — replacement needs a colour to aim at, and a multicoloured object has none.
Some people combine them: replacement first to fix the main colour, then a saturation tool to make the new colour richer or softer. The replacement is flat and exact, so a little saturation adjustment helps it sit naturally in the photo. The two colour fields and the tolerance slider make these combinations easy to try.
Common colour replacement mistakes
The most common mistake is too high a tolerance. At 150 or 200, the replacement spills onto everything with a hint of the target colour: skin, wood, sky, and cloth all shift, and the photo looks wrong in ways that are hard to undo. Start at the default of 32 and raise it slowly, watching the edges of the object. Stop as soon as the whole object is covered.
Second: replacing a colour that appears in the background too. A red shirt against a red brick wall will lose the wall as well as the shirt, because the tool cannot tell them apart — it only sees colour. If the target colour appears where you do not want it changed, replacement is the wrong tool: crop the photo first, or repaint by hand.
Third: expecting the replacement to keep the shading. It does not — a replaced pixel takes the replacement colour exactly, so the folds and shadows of the object become flat. A red shirt replaced with flat green looks painted, not photographed. For a natural look, keep the tolerance low so only the flat areas change, or accept the flat look as a graphic style.
How to use this image color replace tool
Choose an image — JPEG, PNG, or WebP. The tool reads its size and shows it above the result: dimensions, aspect ratio, megapixels, and uncompressed size. Then set the two colours. The target is the colour to replace, default red #FF0000; the replacement is the new colour, default green #00FF00. Type hex codes with or without the hash, or use three-digit shorthand.
Set the tolerance. The default is 32, which catches a colour and its near neighbours. Drag it up if the object has folds and shadows that stay the old colour, and down if the replacement spills onto the background. The preview updates as you drag, so you can see exactly which pixels change. When it looks right, press the download button under the preview.
Everything runs in your browser. No sign-up, no account, no data sent anywhere — the photo never leaves your device, and the page works offline once it has loaded. For shifting all the colours at once, an image hue tool is the companion; for making the new colour richer, an image saturation tool does the job; for a photo with no colour at all, a grayscale converter removes it.