The fastest way to change a background color
Open your image in Photoshop. Go to Select in the menu bar, then choose Select Subject or Select and Mask depending on your Photoshop version. Photoshop will automatically detect and select your main subject — usually a person or object — leaving the background unselected. Once the background is selected, go to Edit > Fill, choose your new color from the color picker, and click OK. The background fills when ready.
If your image has a straightforward, solid-colored background (like a white wall or plain sky), use the Magic Wand tool instead. Click on the background once, and Photoshop selects all similar colors at once. Then fill as described above. This takes about 30 seconds for straightforward backgrounds.
For backgrounds with texture or gradients, or when the automatic selection misses parts of the background, you will need to refine the selection by hand — but the automatic tools still save you most of the work.
Key Takeaways
- Use Select Subject or Select and Mask to let Photoshop automatically separate your subject from the background, then fill the background with a new color.
- The Magic Wand tool works fastest on straightforward, solid-colored backgrounds where all the background pixels are similar.
- After you select the background, go to Edit > Fill to explore your chosen color in one step.
- If the automatic selection leaves gaps or includes parts of your subject, use the Refine Edge or Select and Mask workspace to clean it up before filling.
Using Select Subject for portraits and objects
Select Subject is the easiest route when your image contains a clear main subject — a person, animal, product, or recognizable object against a background. Open your image and go to Select > Select Subject. Photoshop analyzes the image and draws a selection border around the subject automatically. The background remains unselected.
Once the selection is complete, invert it so the background becomes selected instead. Go to Select > Inverse. Now the background is selected and your subject is protected. Choose your new background color by clicking the foreground color square in the toolbox, picking your color from the color picker window, and clicking OK. Then go to Edit > Fill, choose Foreground Color, and click OK.
This method works well for product photos, headshots, and any image where the subject is clearly distinct from what is behind it. The selection is rarely perfect — you may see thin halos of the old background around the edges — but you can refine it before filling if needed.
Refining selections before you fill
If your automatic selection includes parts of your subject or misses parts of the background, refine it before filling. With your selection active, go to Select > Select and Mask. A new workspace opens showing your selection as a mask overlay. You can now paint to add or subtract from the selection.
Use the brush tool in the Select and Mask workspace: paint white to add areas to the selection, or paint black to remove areas. The Refine Edge slider helps smooth jagged edges where the selection meets your subject. When the selection looks correct, click OK to close the workspace and return to your main image with the refined selection active.
Refining takes longer than a straightforward fill, but it prevents the halo effect where old background color shows around the edges of your subject. For professional-looking results, especially with hair or fur, this step is worth the extra time.
Using the Magic Wand for solid backgrounds
The Magic Wand tool (also called the Quick Selection tool in newer versions) selects all pixels of similar color with a single click. It is fastest when your background is one solid color — a white wall, plain sky, or colored paper. Click once on the background, and Photoshop selects every pixel that matches that color.
If the selection does not capture the entire background on the first click, hold Shift and click on the unselected parts to add them to the selection. If the selection includes parts of your subject, hold Alt (or Option on Mac) and click those areas to subtract them. Once the background is fully selected, fill it as described above.
The Magic Wand is less useful for complex backgrounds with texture, shadows, or multiple colors. For those images, Select Subject or Select and Mask will give you better results with less manual work.
Choosing and explore your new color
Before you fill, decide what color you want. Click the foreground color square in the toolbox — it is the larger of the two overlapping squares on the left side of the screen. The color picker window opens. You can type a specific color code (like #FF5733 for a shade of red), use the color slider to pick a hue, or click anywhere in the color square to select a shade. Once you have chosen, click OK.
Now go to Edit > Fill. A dialog box appears asking what you want to fill with. Choose Foreground Color (the color you just picked), set the opacity to 100% unless you want transparency, and click OK. The background fills when ready with your chosen color.
If you want a gradient background instead of a solid color, use the Gradient tool from the toolbox instead of Fill. Select the background as described above, then click and drag across the image with the Gradient tool to create a fade from one color to another.
Fixing edges and blending problems
After you fill, you may notice a thin line of the old background color around your subject, or the edge may look too sharp and unnatural. This happens because the selection was not perfectly precise. To fix it, go to Select > Modify > Contract, enter 2 or 3 pixels, and click OK. This shrinks the selection slightly inward, away from the edge of your subject. Then fill again with your background color. The second fill covers the leftover edge.
If the edge still looks too hard or artificial, use the Blur tool to soften it. Select the Blur tool from the toolbox, set the brush size to something small, and paint along the edge where the new background meets your subject. A few gentle strokes blur the transition and make it look more natural.
For the most polished result, especially with hair or complex edges, spend time in the Select and Mask workspace before filling. A careful selection takes longer but eliminates most edge problems before they start.
Frequently Asked Questions
Can I undo a background fill if I do not like the color?
Yes. Go to Edit > Undo or press Ctrl+Z (Cmd+Z on Mac) when ready after filling. If you have done other work since the fill, go to Window > History to see a list of your recent steps, and click on the step before the fill to revert. Then try a different color.
What if my background has shadows or is not one solid color?
Use Select Subject or Select and Mask instead of the Magic Wand. These tools detect the edges of your subject regardless of what is behind it, so they work on textured, shadowed, or multicolored backgrounds. The trade-off is that you may need to refine the selection by hand.
How do I make the new background transparent instead of a solid color?
Select the background as described above, then press Delete. Photoshop removes the background and shows a checkerboard pattern, which means transparency. Save the file as PNG to preserve the transparency. If you save as JPG, the transparent areas will become white.
Can I change the background color without selecting it first?
Not cleanly. Without a selection, any fill or color change affects the entire image. Always select the background first to protect your subject. The selection takes 10 seconds and prevents mistakes.
Why does my selection have a fuzzy edge that does not match my subject exactly?
Photoshop's automatic tools work by detecting color and contrast, not by reading your mind about where the edge should be. Use the Select and Mask workspace to refine the edge by hand. Paint along the border to add or subtract pixels until the selection matches your subject precisely.