EditSafely

Shrink Selected Color Fields

Pull every area of a chosen color inward by a set number of pixels, filling the edge from its neighbours.

Runs on your device, nothing uploaded

Drop an image anywhere on this page

or paste with Ctrl / ⌘ + V ·

Accepts PNG

Your PNG files never leave this tab

Shrink Selected Color Fields is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, 200 photos straight off a camera means 1.6 GB uploaded, a wait in somebody's queue, and 240 MB downloaded again. Here it means 0 bytes up and 0 bytes down.

  • No upload
  • No file size limit
  • Works offline once loaded
  • Nothing stored or logged

How to use Shrink Selected Color Fields

  1. 1. Add the PNG. Drop in the PNG whose colored areas should get smaller. The edit runs in your browser and keeps the picture size.
  2. 2. Pick the field color. Click the color on the picture or enter it, and use the tolerance to include the softer shades along the edges of that area.
  3. 3. Set how far to shrink and run. Choose a number of pixels. Each step takes a ring off every area of that color, and the freed pixels take the color of the neighbours around them.

When to use Shrink Selected Color Fields

Shrink Selected Color Fields erodes every area of one color inward by a set number of pixels. The pixels it takes away are filled from the surrounding colors, so lines get thinner and small specks of that color vanish without leaving holes.

  • Thinning heavy outlines. Comic or icon outlines that look too bold can be pulled in by a pixel so the colors inside them get more room without redrawing anything.
  • Removing thin stray lines. Shrinking a color by a pixel or two wipes out hairlines and single-pixel specks of it while larger areas of that color only lose a thin edge.
  • Separating touching shapes. Two blobs of the same color that touch at a thin neck come apart after a small shrink, which helps before counting or labelling them.

Examples

Thin heavy outlines

Input

comic.png, color #000000, shrink by 1 px

Output

comic.png with black outlines 2 px narrower

About the Shrink Selected Color Fields tool

Shrink Selected Color Fields is a free online tool that works entirely inside your web browser. Pull every area of a chosen color inward by a set number of pixels, filling the edge from its neighbours. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 292 PNG utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with 3 settings, including Field color, Color tolerance (%) and Shrink by (pixels), and the result is made when you press the button. The finished file is put together in browser memory and saved with the Download button, so it never touches a server on the way to your disk. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive images such as ID scans, screenshots of internal systems or personal photos. It is also quick, since the pixels are processed on your own machine rather than by a remote API.

Frequently asked questions

Does Shrink Selected Color Fields cost anything?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Are my files uploaded to a server?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

Which files does Shrink Selected Color Fields accept?

It accepts PNG images. There is no file size cap imposed by a server; very large files are limited only by your device's memory.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I save the output?

Click the Download button once the result is ready. The file is built in your browser's memory and handed straight to your downloads folder, without passing through a server.

Related tools

All PNG Tools →