How to Do a Black and White Partial Color Effect with The GIMP

Putting a Splash of Color in a Black and White Photo

Female applying red lipstick, close up
Jonathan Knowles/Stone/Getty Images

One of the more dynamic photo effects involves converting a photo to black and white except for one object that stands out in color. You can achieve this in many ways. Here's a non-destructive method using a layer mask in the free photo editor The GIMP.

Save and Open the Practice Image

Practice Image
This is the image we'll be working with. Photo © Copyright D. Spluga. Used with permission.

Start by opening your own image, or save the photo shown here to practice on as you follow along. Click here for full size. If you're using The Gimp on a Mac, substitute Command (Apple) for Control, and Option for Alt whenever keyboard shortcuts are mentioned. 

Duplicate the Background Layer

Duplicate the Background Layer

First we'll make a copy of the photo and convert it to black and white. Make the layers palette visible by pressing Ctrl-L. Right click on the background layer and choose "duplicate" from the menu. You'll have a new layer called "background copy." Double-click on the layer name and type "grayscale," then press enter to rename the layer.

Convert the Duplicate Layer to Grayscale

Desaturate dialog box

Go to the Colors menu and choose "desaturate" with the grayscale layer selected. The "remove colors" dialog offers three ways of converting to grayscale. You can experiment to find out which you prefer, but I'm using the luminosity option here. Press the "desaturate" button after making your selection. 

Add the Layer Mask

Add Layer Mask dialog box

Now we'll give this photo a punch of color by restoring color to the apples using a layer mask. This allows us to easily correct mistakes.

Right click on the "grayscale" layer in the layers palette and choose "Add Layer Mask" from the menu. Set the options as shown here in the dialog that appears, with "White (full opacity)" selected. Then click "Add" to apply the mask. The layers palette will now show a white box next to the image thumbnail – this represents the mask.

Because we used a duplicate layer, we still have the color image in the background layer. Now we're going to paint on a layer mask to reveal the color in the background layer below it. If you've followed any of my other tutorials, you may already be familiar with layer masks. Here's a recap for those who aren't:

A layer mask lets you erase parts of a layer by painting on the mask. White reveals the layer, black blocks it completely, and shades of gray partially reveal it. Because our mask is currently all white, the entire grayscale layer is being revealed. We're going to block the grayscale layer and reveal the color of the apples from the background layer by painting on the layer mask with black. 

Reveal the Apples in Color

Paint on the layer mask to reveal the color of the apples

Zoom in on the apples in the photo so they fill your workspace. Activate the Paintbrush tool, select an appropriately-sized round brush, and set opacity to 100 percent. Set the foreground color to black by pressing D. Now click on the layer mask thumbnail in the layers palette and begin painting over the apples in the photo. This is a good time to use a graphics tablet if you have one.

As you paint, use the bracket keys to increase or decrease the size of your brush:

  • [ makes the brush smaller
  • ] makes the brush larger
  • Shift + [ makes the brush softer
  • Shift + ] makes the brush harder

If you're more comfortable making selections than painting in the color, you can use a selection to isolate the object you want to color. Click the eye in the layers palette to turn off the grayscale layer, make your selection, then turn the grayscale layer back on. Click the layer mask thumbnail, and then go to Edit > Fill with FG Color, with black as the foreground color.

Don't panic if you go outside the lines. I'll show you how to clean that up next.

Cleaning Up the Edges by Painting in the Layer Mask

cleaning up the edges of the mask

You probably painted color onto some areas that you didn't intend to. No worries. Just switch the foreground color to white by pressing X and erase away the color back to gray using a small brush. Zoom in close and clean up any edges using the shortcuts you've learned.

Set your zoom level back to 100 percent (actual pixels) when you're done. You can do this by pressing 1 on the keyboard. If the colored edges look too harsh, you can soften them slightly by going to Filters > Blur > Gaussian Blur and setting a blur radius of 1 to 2 pixels. The blur is applied to the mask, not the photo, resulting in a softer edge.

Add Noise for a Finishing Touch

RGB Noise dialog box

Traditional black and white photography would ordinarily have some film grain. This was a digital photo so you won't get that grainy quality, but we can add it with the noise filter.

First we have to flatten the image that will remove the layer mask, so make sure you're completely happy with the color effect before we start. If you want to keep an editable version of the file before flattening, go to File > Save a Copy and choose "GIMP XCF image" for the file type. This will create a copy in GIMP's native format but it will keep your working file open.

Now right click in the layers palette and choose "Flatten Image." With the background copy selected, go to Filters > Noise > RGB Noise. Uncheck the boxes for both "Correlated Noise" and "Independent RGB." Set the Red, Green and Blue amount to 0.05. Check the results in the preview window and adjust the image to your liking. You can compare the difference with and without the noise effect by using the undo and redo commands.

Crop and Save the Photo

The Finished Image
The Finished Image. Photo © Copyright D. Spluga. Used with permission.

As a last step, use the Rectangle Select Tool and make a crop selection for a better composition. Go to Image > Crop to Selection, then save your finished image.