HeyDreaming

Free · processed in your browser · free account to download

Change the Background Color of a Photo

Loading the tool…

Drop a photo into the box, let your browser cut out the subject, and swap the backdrop for any of 13 preset swatches or a custom color from the picker. Preview it live, then download a JPG with a free account. Your image is not uploaded.

How do I change the background color of a photo?

Drop a JPG, PNG, WebP, AVIF or HEIC file up to 30 MB into the box above. Your browser cuts out the subject once, on your device. Click any of the 13 color swatches or pick a custom shade, and compare the result with the slider. The full-size file is rendered again at 95% quality after each color change, ready to download.

How it works

01

Add the photo

Drag a JPG, PNG, WebP, AVIF or HEIC (.heif) file up to 30 MB into the box, or click to choose one.

02

Wait for the subject mask

The browser computes the cutout mask on your device, so the photo is not uploaded. The first run takes a few seconds longer.

03

Pick a background color

Click one of the 13 preset swatches (blue, purple, green, pink, red, yellow, orange, gold, gray, brown, teal, beige, pastel) or open the custom color picker to set any hex color. Switching colors repaints the preview (up to 1200 px) without re-running the model.

04

Download the JPG

The cutout is composited over your chosen color at full resolution (up to 4096 px on the long side) at 95% quality on its own, and again after each color change; click Download to save your -color-bg.jpg file. Saving asks you to sign in to a free HeyDreaming account (Google or email, no credit card).

One cutout mask, instant color changes

Finding the subject is the heavy step: your browser resizes a copy of the photo to 1024×1024 pixels and analyses it once to generate an alpha mask for the full-size picture. Because that mask is kept in memory for your photo, trying different background colors does not run the AI model again.

Each click on a swatch or drag in the color picker repaints a preview copy (up to 1200 px) after a brief 150 ms pause and updates the hex readout next to the picker. You can test brand colors, passport backdrops (such as blue, red or gray) or pastel profile colors side by side with the original before committing to a download.

Preset swatches and custom hex codes

The toolbar includes 13 one-click swatches covering common catalog, badge and profile requests: blue, purple, green, pink, red, yellow, orange, gold, gray, brown, teal, beige, pastel (starting at #2563EB). Below the swatches, the Custom color input opens your system color picker and prints the active six-digit hex code in uppercase.

A moment after each color change, the full-size photo (capped at 4096 px on the long side) is masked and drawn onto a canvas filled with that exact hex color, then encoded as an 8-bit sRGB JPG at 95% quality.

What changes in the file and edge tips

The downloaded file is always a flat sRGB JPG named with -color-bg before the extension. Camera metadata (EXIF, capture date, GPS coordinates) and embedded ICC color profiles are not copied over, and wide-gamut Display P3 colors from phone cameras are converted to standard sRGB.

Because the model cuts out the subject without recoloring its edge pixels, switching from a dark room to a bright yellow backdrop (or from a white wall to a deep navy backdrop) can reveal a thin rim of the original background's brightness along wispy hair. Picking a background shade closer in brightness to the original room usually hides fine edge transitions.

What this tool does not do

It does not paint multi-color gradients or scenic backdrops, recolor clothing or objects inside the subject, or keep EXIF metadata and wide-gamut color profiles.

See all free tools

Background colors

Keep exploring

Related free tools

Questions

Change Background Color: FAQ

Is my photo uploaded when I change the background color?

No. Your image is not uploaded and stays on your device, including when you sign in before downloading. The cutout is made locally in your browser. Usage events such as tool runs and file sizes are sent to Google Analytics, never the photo.

Does trying another color run the AI model again?

No. The mask is computed once when you load the photo. Clicking another swatch or moving the custom color picker only repaints the canvas underneath the existing cutout.

Which preset colors are built in?

There are 13 presets: blue, purple, green, pink, red, yellow, orange, gold, gray, brown, teal, beige, pastel. You can also pick any other shade using the Custom color input, or use the dedicated white background and black background pages for #FFFFFF and #000000.

Can I type or match a specific brand hex color?

Yes. Click the Custom color input to open your browser's color dialog — most desktop browsers let you type or paste a hex or RGB value directly into that picker, and the chosen hex code is shown right beside it.

Which file formats and sizes are supported?

You can drop in a JPG, PNG, WebP, AVIF or HEIC (.heif) image up to 30 MB. Photos larger than 4096 px on the long side are scaled down to 4096 px first, and the output is saved as a JPG at 95% quality by default. The Format menu at download can switch it to PNG, WebP, TIFF or PDF.

Can I apply the same background color to a whole folder of photos?

This page works on one photo at a time. To put a batch of photos onto the same custom hex color (with an optional contact shadow and resize step), use the batch editor.