GUIDE

How to remove the background from a picture, and when color alone is enough

How background removal by color works, which pictures it suits, how to set tolerance, edges and soft shadows, and what to do when part of the subject vanishes.

By StillKit · Published

A plain background can be removed by color alone. The tool finds the color along the edges of the picture, makes every pixel of that color transparent and cleans up the outline. That is enough for a product on white card, a logo, a signature on paper or a person in front of a plain wall. It is not enough for a person in a room or a street, where the background has as many colors as the subject.

Two ways to separate a subject

Background removers work in one of two ways. Some recognize what is in the picture, a person or an object, and keep that. Others compare colors: whatever matches the background color is removed. Background remover on this site is of the second kind. It does not know what your subject is, so it cannot separate a face from a busy room. In exchange, it runs entirely in your browser, and its result is predictable: the same color and settings always remove the same pixels.

How the background color is found

In automatic mode the tool looks only at the edges of the picture, where the background usually is. It groups the colors it finds there. The largest group is taken as the background if it covers at least a fifth of the edges. Up to two more groups are accepted when they are close in color to one already accepted, as uneven light produces, or when they fill a large part of the edges, as a table does below a wall.

Real backgrounds are rarely one flat color. Light falls off toward a corner, and a white wall photographs as a range of grays. The tool therefore also fits a gentle change of light across the picture and compares each pixel with the background expected at that spot.

If no color covers a fifth of the edges, nothing is removed and the result says so. Click the background in the preview to choose its color yourself.

Tolerance and softness

Colors are compared in OKLab, a color space built so that equal distances look like equal differences to the eye. Plain RGB distances do not: two colors a given distance apart can look almost the same in one part of the color range and clearly different in another.

Tolerance is how far a color may be from the background and still be removed. The default is 5 on a scale from 0 to 100, which is strict on purpose: a face in front of a gray wall can be only a few steps away from the wall. Raise the tolerance when patches of background remain, and lower it when parts of the subject fade. Softness sets how gradually colors a little beyond the tolerance fade out. Raise it for hair or fur.

Why the outline needs separate care

A camera does not record a hard line between subject and background. Each pixel on the outline is a mix of the two, say 60% red mug and 40% white card. If such a pixel is kept as it is, the cut-out carries a pale rim that shows as soon as you place it on a dark page. If it is deleted, the outline looks jagged.

For every outline pixel the tool estimates the background beside it and the subject color beside it, and works out where the pixel sits between the two. That share becomes its transparency. Then the background color is taken out of the pixel, so the 60% that remains is pure red.

Touching the edges, or everywhere

What each Remove setting does
SettingRemovesUse it for
Background touching the edgesMatching color that is connected to the edge of the picturePhotos, where the subject may contain the same color: the white of an eye, a label
Every area of that colorEvery matching pixel, wherever it isLogos and text, where the inside of an O or a cup handle must clear too

The first setting makes one exception. A gap that is closed off only by thin lines, such as the inside of a handwritten letter or the space between strands of hair, is cleared as well. A gap behind a thick wall stays.

Soft shadows

A shadow under a product is the background itself, only darker. Its color keeps the background's hue and its darkness changes slowly from pixel to pixel. With Soft shadows set to Remove soft shadows, the tool follows that slow change from the removed area and removes the shadow with it. The edge of a subject is a sudden change, so the tool stops there, even when the subject is gray on a white background.

Two cases need Keep shadows instead. A shadow with a hard edge is not followed, so it stays either way. And a white or pale gray subject that blends smoothly into a white background can fade along with the shadow.

Step by step

  1. Open Background remover and choose your picture. The preview shows the cut-out on a checkered pattern, which stands for transparent areas.
  2. Read the line under the preview. It names the color that was found and the share of the picture removed. If the color is wrong, click the background in the preview.
  3. Adjust Tolerance a few steps at a time and watch the preview. Then choose the Remove setting and the Soft shadows setting that suit the picture.
  4. Choose the new background: Transparent, or Solid color with the color you want. Choose Trim to the subject to cut away the empty margins.
  5. Save as PNG, or as WebP for a smaller file. Both keep transparency. The WebP is saved at high quality with a small loss of detail.

When the result is not right

  • Part of the subject is missing. It is close to the background color. Lower the tolerance, set Soft shadows to Keep shadows, and keep Remove on Background touching the edges.
  • Patches of background remain. Raise the tolerance a little, or click the remaining patch in the preview if it is a second color.
  • The inside of letters stays filled. Choose Every area of that color.
  • Nothing was removed. No plain color was found at the edges. Pick the color by clicking the preview, or crop the picture first with Image crop so that the background fills the edges.

Some pictures cannot be separated by color: a subject the same color as its background, fine hair against a similar tone, and any busy background. Photographing the subject again in front of a plain surface of a different color gives a better result than any setting.

After the cut-out

A transparent picture has to stay in a format that can hold transparency. PNG and WebP can; JPEG cannot, and saving a cut-out as JPEG fills the transparent areas with a solid color. JPEG, PNG or WebP explains the difference. To put the subject on a color later, use Image background color. Transparent image padding adds an even margin around it.

The tool accepts PNG, JPEG and WebP pictures up to 20 MB, 25 megapixels and 8,192 pixels on each side. For a signature that will go on a document, you may not need a cut-out at all: Sign PDF can make the white paper around a signature transparent by itself.

TRY IT YOURSELF

Tools used in this guide

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →