The fastest way to change a background color

The quickest method is to use the Select Subject tool, which isolates your main object and leaves the background selected. Once the background is selected, you fill it with a new color using the bucket fill tool. This takes about two minutes if your subject has clear edges — a person against a plain backdrop, a product on white, a logo on solid color.

If your background is already a single flat color (white, gray, a studio backdrop), the Select by Color tool works even faster. Click once on the background color, and Photoshop selects every pixel that matches. Then fill with your new color. If your background is complex — trees, a street, mixed textures — you will need to spend more time on selection, which we cover in the sections below.

Key Takeaways

  • Use Select Subject for photos where you want to keep the main object and change only the background.
  • Use Select by Color when your background is a single flat color that does not appear in your subject.
  • The bucket fill tool applies your chosen foreground color to any selected area in one click.
  • Complex backgrounds require the Quick Selection tool or manual refinement with the eraser to get clean edges.
  • Save your work as a PSD file before flattening so you can go back and adjust the color later.

Using Select Subject for portraits and product photos

Open your image in Photoshop. Go to the top menu and click Select, then choose Subject. Photoshop analyzes the image and automatically selects your main object — the person, the product, the thing you want to keep. The background is now unselected.

Now invert the selection so the background becomes selected instead. Go to Select > Inverse. You will see the marching ants (the animated dotted line) now outline the background. Click on your foreground color square (the colored box in the toolbox on the left side) and choose the color you want. Then go to Edit > Fill, choose Foreground Color, and click OK. Your background is now the new color.

This method works best when your subject has distinct edges — a person against a plain wall, a product shot on white, a logo on a solid color. If your subject has wispy hair, thin branches, or blends into the background, you will see rough edges where the selection was imperfect. You can refine these with the eraser tool set to a soft brush, or use the Refine Edge option in the Select menu.

Using Select by Color for flat backgrounds

If your background is already a single color — pure white, a studio gray, a solid-colored wall — the Select by Color tool is faster than Select Subject. Find the tool in the toolbox on the left (it looks like a finger pointing at colored squares), or press Shift+O on your keyboard.

Click once on the background color. Photoshop selects all pixels of that color throughout the image. If the selection includes parts of your subject that happen to be the same color, hold Shift and click on those areas to deselect them. Once only the background is selected, choose your new foreground color and go to Edit > Fill > Foreground Color. The background changes instantly.

The Tolerance setting (visible in the options bar at the top when this tool is active) controls how similar a color has to be to get selected. A low tolerance of 10 to 20 selects only colors very close to what you clicked. A high tolerance of 50 or above selects a wider range. Start at 32 and adjust if you are selecting too much or too little of the background.

Handling complex backgrounds with Quick Selection

When your background has texture, multiple colors, or blends into your subject, Select Subject and Select by Color both struggle. The Quick Selection tool gives you more control. Find it in the toolbox (it looks like a magic wand with a plus sign), or press W on your keyboard.

Paint over the background with the Quick Selection tool. Photoshop selects areas of similar color and texture as you drag. If you select part of your subject by mistake, hold Alt and paint over that area to deselect it. Once the background is selected, invert the selection with Select > Inverse so your subject is selected instead. Then go to Select > Inverse again to select the background, and fill with your new color.

This method requires patience and usually leaves some rough edges. After filling the background, use the eraser tool with a soft brush to clean up any color that spilled onto your subject. Set the eraser to 20 to 30 percent opacity so you can erase gradually and avoid hard lines.

Filling with color and adjusting the result

Once your background is selected, you need to fill it with color. First, click the foreground color square in the toolbox (the larger of the two overlapping colored boxes on the left). A color picker opens. Choose your color and click OK. The foreground color now shows your choice.

Go to Edit > Fill. A dialog box opens with several options. Choose Foreground Color and click OK. Your background fills instantly. If you want to undo and try a different color, press Ctrl+Z (Windows) or Command+Z (Mac) and pick a new foreground color.

If the fill looks too harsh or the edges are rough, you have a few options. Use the eraser tool to soften edges where the new background meets your subject. Lower the eraser opacity to 30 to 50 percent so the transition is gradual. Alternatively, go to Select > Modify > Feather and enter 5 to 10 pixels before filling. This softens the edge of your selection so the color blends more naturally.

Saving your work so you can change the color later

Before you flatten your image, save it as a PSD file (Photoshop's native format). Go to File > Save As, choose PSD from the format dropdown, and save. This preserves your layers and selections so you can come back and change the background color again without starting over.

Once you are happy with the result, you can export it as a JPG or PNG for use elsewhere. Go to File > Export As, choose your format, and click Export. This creates a flattened copy without affecting your PSD file. If you need to change the background color in the future, open the PSD, select the background again, and fill with a new color.

Frequently Asked Questions

Why does my background selection include part of my subject?

This usually means your subject and background share similar colors. Use the Quick Selection tool instead and paint only on the background, or use Select Subject and then refine the edges with the eraser. You can also lower the Tolerance setting in Select by Color to be more selective about which colors get picked up.

How do I make the edge between my subject and the new background look smooth?

Before filling, go to Select > Modify > Feather and enter 3 to 5 pixels. This softens the edge of your selection. After filling, use the eraser tool at low opacity (20 to 30 percent) to blend any remaining hard lines. A soft brush works better than a hard one for this.

Can I use a gradient or pattern instead of a solid color for the background?

Yes. Instead of using Edit > Fill with Foreground Color, use the gradient tool or bucket fill tool set to Pattern mode. Select your background first, then choose your gradient or pattern from the options bar and click to apply it.

What if I accidentally filled the wrong area?

Press Ctrl+Z (Windows) or Command+Z (Mac) to undo. Check your selection by looking for the marching ants outline. If the selection is wrong, go to Select > Deselect, try a different selection method, and fill again.

Should I flatten my image before saving?

No. Save as PSD first so you keep your layers and can edit later. Only flatten when you are completely done and ready to export as JPG or PNG. Flattening combines all layers and cannot be undone without the original PSD file.