FLXCode Change Image Color

FLXCode apps

Appearance

Change Image Color

Click the colour you want gone, pick the new one, and download. Or turn the hue, saturation and lightness of the whole picture. It runs on your device.

or drop one here, or paste with Ctrl+V. One picture at a time.

JPG, PNG, WebP, HEIC, AVIF, GIF or BMP, up to 25 megapixels. Nothing is uploaded.

Works offline: load this page, choose a picture, turn off Wi-Fi, change more.

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it. What this tool keeps and sends.

Problem or idea? Email us

How to use it

  1. Choose a picture, or drop one on the page.
  2. Click the colour you want to replace. No mouse: Tab to the picture, move the cross with the arrow keys, press Enter.
  3. Choose the new colour. Type a hex value or use the colour box.
  4. Raise Tolerance until the whole object changes. Use Softness for a gentler edge. Tick "Show what will change" to see the area in magenta.
  5. Hold the button under the picture to compare with the original. Then Download.

Numbers this uses

  • Distance is measured in OKLab and multiplied by 100. Black to white is 100.
  • Every pixel inside the tolerance changes fully. Beyond it the change fades out over the softness, with a smooth curve.
  • Keep shading turns the hue of each pixel by the same angle as From to To, scales its chroma by the ratio of the two chromas (at most 4 times) and moves its lightness by the same offset. A colour that sRGB cannot show loses chroma, not lightness or hue.
  • Pixels with chroma under 0.02 count as gray and are left alone when the colour to replace has chroma of 0.04 or more.
  • The preview is drawn at up to 1200 px on the long side. The saved file is worked out again at full size.

Limits

  • One picture at a time, up to 25 megapixels.
  • It works on colour only. It is not a mask editor and it will change the same colour everywhere in the picture.
  • Hair, glass and metal often change colour with the light. Keep shading works best on solid coloured objects.
  • JPG input has noise in flat areas. Use a little tolerance.
  • sRGB only. Other colour profiles are dropped.

How it works and privacy

The colour maths is OKLab and OKLCH (Björn Ottosson, also in CSS Color 4). Pixels are converted from sRGB, changed, and converted back. The conversion is checked against a Python port of the CSS Color 4 sample code on 2,010 colours, and a round trip through all 16.7 million sRGB colours (one in 997) comes back within one level. Your browser opens and saves the picture. Nothing you choose is uploaded. We count events without cookies, like "PNG downloaded" (details).

FAQ

What is tolerance?

How far from the colour you clicked a pixel may be and still change. It is measured in OKLab, a colour space built so that equal steps look about equal. 0 changes only the exact colour. 20 is a good start for a flat colour. A black pixel and a white pixel are about 100 apart.

What does softness do?

It makes the edge of the change fade out over that many steps, so there is no hard border where the colour stops. 0 is a hard edge.

What does Keep shading do?

On, the light and dark parts of an object stay light and dark: a shadow on a red car becomes a shadow on a blue car. Off, every matching pixel becomes exactly the new colour, which is flat. Turn it off for logos and icons with one flat colour.

Why did my gray parts not change?

When the colour you replace is a real colour, grays are left alone, even at a high tolerance. Gray has no hue, so there is nothing to turn. To recolour a gray or white area, click it and it becomes the colour you choose.

What does Shift the whole picture do?

It turns every colour round the colour wheel (hue), makes colours stronger or weaker (saturation) and the picture lighter or darker (lightness). Invert hue turns all colours by 180 degrees, Grayscale takes the colour out.

Can I undo?

Yes. Undo and Redo go through your changes, Ctrl+Z and Ctrl+Y work too. Reset puts all settings back to the start, and Undo brings your settings back.

More from FLXCode

  • Color Picker from ImageClick a picture to get the HEX, RGB, HSL, HSV and CMYK of any pixel, plus its dominant colors. Nothing is uploaded.
  • Remove Background from ImageCut the background out of product and pet photos in your browser, fix it with a brush or clicks. Nothing is uploaded.
  • Image ResizerResize photos by pixels, percent or preset for Instagram and email. Batch and zip. Nothing is uploaded.
  • Make Background TransparentMake a plain white or coloured background see-through and save a PNG. Nothing is uploaded.

Share Change Image Color