Skip to main content
Remove backgrounds in seconds — no signup for your first free image.
Back to Resources
tutorialsproduct-photographye-commerce

How to Change the Background Color of a Photo (Without Ruined Edges)

Change a photo's background to white, grey, green, blue or any color: the three methods that work, how to pick a color that suits the subject, how to avoid halos and color spill around the edges, and how to export so the color stays exact.

8 min read
Written by Jack Shi
How to Change the Background Color of a Photo (Without Ruined Edges)
Try ShotBG on your own photo
AI background removal · Free · No signup needed
Upload Image

To change the background color of a photo, separate the subject from the old background, then place the subject on a new layer of the color you want. Recoloring the old background directly only works when it is already a flat, even color; for anything else, cutting the subject out gives cleaner edges and an exact color. There are three practical methods: cut out and add a color layer, recolor a flat background, or reshoot against the right backdrop. This guide shows each, how to choose the color, and how to export so the color stays exact.

Pick the method by the photo you have

MethodBest forEffortMain risk
1. Cut out the subject, add a color layerCluttered, uneven or textured backgrounds; most photosOne cutout per imageA halo or rough fringe at the edge if the cutout is poor
2. Recolor a flat backgroundA plain, evenly lit backdrop of one colorQuick for a few imagesThe color bleeds into the subject, or banding where the shades vary
3. Reshoot with a colored backdropRegular shoots where you control the setSetup onceColor spill onto the subject from the backdrop

If you are unsure, use method 1. It works on almost any photo, and the same cutout can be reused on many colors.

Method 1: Cut out the subject and add a color layer

  1. Remove the background. Use an AI background remover such as ShotBG or a manual selection in an editor. ShotBG takes a PNG, JPG or WebP and returns the subject as a PNG with a transparent background. For the basics see how to remove the background from an image.
  2. Open the transparent PNG in an editor that supports layers. Photoshop, GIMP and Photopea all do.
  3. Add a new layer under the subject and fill it with your color. Enter an exact value, such as #FFFFFF for white, rather than eyeballing it.
  4. Inspect the edges at 200 to 300% zoom. Look for a light fringe where the old background still shows, or a rough, cut-out look around hair and fine edges. Fix with a small refine, feather or "defringe" step.
  5. Flatten a copy and export. Keep the transparent PNG as your master so you can swap colors later.

ShotBG removes the background and gives you the transparent PNG; adding the color layer is the editor step. Our background color changer page walks through the green, grey and blue cases, and the white background tool covers the white case.

Got a product photo that needs a clean background?

ShotBG removes backgrounds in seconds with AI. Free for your first image — no signup required.

Remove Background Free

Method 2: Recolor a flat background

When the background is already one even color, you can shift it with a Hue/Saturation adjustment or a Replace Color command, selecting the background by its color and changing the hue or lightness.

  • It works best on a clean, evenly lit backdrop and a subject whose colors are very different from it.
  • It struggles when the subject contains similar colors (a green background and a green plant), because the selection catches both.
  • Shadows and falloff leave patches of different shades, so the result can look blotchy in the corners.

If the result looks uneven or the subject changes color too, go back to method 1.

Method 3: Reshoot against a colored backdrop

For regular product or portrait work, a colored paper or fabric backdrop saves editing time. Keep the subject away from the backdrop and light the backdrop separately. A colored surface reflects light onto nearby edges, called color spill, which tints the subject. Distance and flagging light off the backdrop reduce it.

How to choose the new color

  • Contrast with the subject. Pick a background that clearly separates from the subject's edge. A dark subject reads well on a light or saturated color; a pale subject disappears on white.
  • Use neutral colors for catalogs. White and light grey keep attention on the product and match most marketplace and store layouts. For exact white see how to get a pure white background.
  • Use equal channel values for a true grey. Equal red, green and blue values give a neutral grey with no tint, for example #808080 for mid grey.
  • Use a saturated green or blue for a keying background. If the image is meant to be keyed out later, choose a flat, saturated color that does not appear in the subject. Your video or compositing software has its own settings for the color it expects.
  • Check the rules for the destination. Marketplaces, ID or passport photos and platform profile images each have their own requirements, and they change. Confirm the current rule from the official source before you export.
Skip Photoshop — try the faster version.

Upload your image and get a transparent PNG instantly. Works for products, portraits, and graphics.

Try It Now Free

Avoid the three common edge problems

  1. Halo. A thin line of the old background color shows around the subject. Fix it by contracting the selection slightly, using a defringe or "remove matte" step, or refining the cutout.
  2. Color spill. The old background's color is reflected on the subject's edges (a green edge from a green backdrop). Reduce it by desaturating the edge or painting a small amount of the subject's own color over it.
  3. Hard, cut-out edges. On hair, fur or fabric, a hard edge looks fake. Use a refine or feather setting on those areas, and check with the new color in place because edges that look fine on a white preview can show on a dark color.

Export so the color stays exact

  • Save the transparent PNG as your reusable master.
  • Export the finished image as PNG when the exact color matters, since JPG compression can shift pixel values slightly, especially near edges.
  • Use the sRGB color profile for web and marketplace work.
  • Re-open the exported file and sample the background with an eyedropper to confirm the value.

Common mistakes

  • Painting over the old background. It leaves ragged edges and a visible brush boundary. Cut out and replace instead.
  • Guessing the color. Type the hex value so the same color can be reproduced on every image.
  • Skipping the edge check. Inspect at high zoom with the new color in place.
  • Expecting an app to recolor the subject. Changing the background does not change the subject's color, and it does not remove props or hands that overlap it.
  • Trusting a white preview. A cutout that looks clean on white can show fringes on grey, green or dark colors.

FAQ

How do I change the background color of a photo?

Remove the original background, then add a new layer of the color you want under the subject in an image editor. Use a cutout for most photos, and the Hue/Saturation or Replace Color command only when the background is already a flat, even color.

Can I change the background color without Photoshop?

Yes. Free editors such as GIMP and Photopea support layers, so you can place a transparent cutout over a color layer there. To get the cutout, you can use an AI background remover first.

Can ShotBG change the background to a solid color?

ShotBG removes the background and exports a transparent PNG. It does not have an in-app solid-color picker, so you add the color layer in an editor. Pro custom backgrounds can generate a studio-style scene in a color you describe, but generated scenes are not exact flat colors, so use the editor route when you need a precise value.

What is the hex code for grey?

There is no single grey. A neutral grey has equal red, green and blue values, for example #808080 for mid grey, #C0C0C0 for light grey and #404040 for dark grey. Pick the shade that contrasts with your subject.

Why does my new background look uneven?

Usually because the old background had shadows or lighting falloff and you recolored it instead of replacing it. A cutout placed over a flat color layer gives a uniform result.

Should I save as PNG or JPG?

PNG when the exact color matters, because JPG compression can shift pixel values. JPG is fine for photos where a small shift is acceptable and file size matters more.

Ready to Transform Your Product Photos?

Try ShotBG's AI-powered background removal tool for free. No signup required for your first image.

Try ShotBG Free