Color Replace
Click a colour in a picture and swap it for another, keeping its light and shade, or make it transparent. Tolerance and feather control exactly which pixels change.
How to Use
- Drop an image on the box, click to browse, or paste one. TIFF, PSD, HEIC, TGA and camera RAW files open too. A built-in sample is loaded so you can try the presets straight away.
- Click the colour you want to change in the picture (or set Find by hand), then choose the Replace colour, or tick Make transparent.
- Raise Tolerance until the whole area is caught, and Feather for a soft edge. The distance histogram shows where both limits fall.
- Leave Shading on Keep to shift the colour while keeping texture and light, or choose Flat to paint one solid colour.
- Save from the Save panel. For transparency choose PNG or WebP; JPEG has no transparency.
#c0392b#2b6cc0Worked Example
Brick red #c0392b, RGB (192, 57, 43), to blue #2b6cc0, RGB (43, 108, 192). A wall pixel (200, 64, 50) is √(8² + 7² + 7²) = 12.73 from the Find colour, 2.9% of the largest distance 441.67, so with a 12% tolerance (53.0) it is fully replaced. Keep shading adds the difference (−149, +51, +149): (51, 115, 199), slightly lighter than the flat blue, just as the pixel was slightly lighter than the flat red.
A pixel in the feather band. A brighter brick (240, 90, 60) is √(48² + 33² + 17²) = 60.68 away, beyond the tolerance of 53.0 but inside tolerance + feather, 53.0 + 35.3 = 88.3. It is changed by t = 1 − (60.68 − 53.0) ÷ 35.33 = 0.783: its target (91, 141, 209) is mixed 78.3% into the original, giving (123, 130, 177), a soft step between the red and the blue.
The common mistake: a tolerance that reaches neighbouring colours. A brown door (150, 90, 60) is only 56.05 from the brick red, 12.7% of the maximum, inside the feather band, so it turns 91% blue along with the wall. Check the distance histogram: the matching hump should end before the next one starts, and set the tolerance in the gap.
Show Work
Formulas
t = 1 − (d − τ) ÷ φ if τ < d < τ + φ
Colour Distance and Chroma Keying
Every pixel is a point in a cube with red, green and blue along its three edges, from (0, 0, 0) black to (255, 255, 255) white. The straight-line distance between two points measures how different two colours are, and the longest line in the cube, corner to corner, is √3 × 255 = 441.67. Selecting “every colour within a distance of the target” therefore picks a ball inside that cube, which is what the tolerance sets and what the histogram under the picture shows. RGB distance does not match human perception exactly, which is why the feather band and a look at the result matter.
Making one colour transparent is the idea behind chroma keying in film and video: the subject is shot in front of an evenly lit screen of a colour that appears nowhere else in the scene, usually green or blue, and every pixel close to that colour is replaced. A soft edge between “key” and “not key” keeps hair and motion blur from looking cut out, the same job the feather does here.
About This Tool
This tool finds every pixel within a tolerance of one colour, replaces it with another colour while keeping shading, paints it flat, or fades it to transparent, with a feather band for soft edges. It counts the pixels fully and partly changed, plots every pixel’s distance from the target with both limits marked, and works through any pixel you click. Settings can be put in the page address, for example ?find=ffffff&clear=1&tol=8.
Images are decoded and saved in your browser by the engine behind the Universal Image Converter, so TIFF, PSD, HEIC, TGA and RAW files work too. Nothing is uploaded.
Related tools: Background Remover & Replacer, Colorize Black & White, and Duotone Effect.
Frequently Asked Questions
How does the tool decide which pixels match?
It measures the straight-line distance between each pixel and the Find colour in RGB: √(ΔR² + ΔG² + ΔB²). The largest possible distance, black to white, is 441.67, and the tolerance is a percentage of that: 12% is 53.0. Pixels inside the tolerance are fully replaced; pixels in the feather band beyond it are partly changed.
What does Keep shading do?
Instead of painting one flat colour, it moves each matched pixel by the difference between the two colours, so a lighter or darker part of the area stays lighter or darker. Replacing red #c0392b with blue #2b6cc0 turns a pixel (200, 64, 50) into (51, 115, 199) rather than the flat (43, 108, 192), so texture and light survive.
What does Feather do?
It softens the edge. A pixel just beyond the tolerance is changed by t = 1 − (distance − tolerance) ÷ feather. With tolerance 53.0 and feather 35.3, a pixel 60.68 away is changed by 78%, and one 88.3 or more away is left alone. Without feather, anti-aliased edges look cut out.
Can I remove a background colour?
Yes. Tick Make transparent: matched pixels fade to transparent instead of changing colour, with the feather band giving a soft edge. White product backgrounds and green screens are presets. Save as PNG or WebP to keep the transparency.
Why did a colour I wanted to keep change too?
It was close enough to the Find colour. A brown wooden door (150, 90, 60) is only 56.05 from brick red (192, 57, 43), 12.7% of the maximum, so a 12% tolerance with 8% feather still changes it by 91%. Lower the tolerance or feather, or pick the colour on the area itself.
How do I use the Color Replace?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Recolour a product or logo
Swap a red #c0392b for a blue #2b6cc0 with Keep shading, so folds and highlights stay natural.
Remove a white background
Make transparent at 8% tolerance and 6% feather clears a #ffffff background with a soft edge.
Green-screen cut-out
Find #00b140 at 25% tolerance makes a chroma-key green transparent for a quick composite.
Team or brand colour variants
Make versions of a jersey, banner or icon in other colours for mock-ups without redrawing.
Last updated: