How to Change Hair Color in GIMP

One of the most interesting and enjoyable aspects of being an image editor is that you can see how the world would look if it was just a bit different with only a few clicks of your mouse and a few minutes of your time. 

Which color should I choose today?

Want to know if dying your hair that bright beautiful purple is a good idea? Maybe you’ve always wanted to see yourself in a serious goth phase with blood-red hair, but you didn’t want to take the plunge? Whatever your reasons may be, changing hair color in GIMP is easy as long as you have the time and patience for proper masking! 

Blue? Purple? Red? Grey?

Please note that the image used in this tutorial is by Bruno Emmanuelle, courtesy of Unsplash.com.

The Quick Guide to Change Hair Color in GIMP

Here’s the very abridged guide to the process of changing hair color in GIMP:

  • Step 1: Create a new layer and fill it with your chosen new hair color. 
  • Step 2: Add a layer mask filled with black to the color layer.
  • Step 3: Paint white on the layer mask over the model’s hair to show the new color.
  • Step 4: Set the color layer’s blending mode to HSV Hue.

If you’ve ever tried doing color changes to hair, you’ll know that it’s easy to do badly and very difficult to do well – and that applies to the real world as well as to images in GIMP! There are quite a few different ways to change hair colors in GIMP, so let’s dive a bit deeper into how it all works.

The Detailed Guide to Change Hair Color in GIMP

Before we really get started, it’s important to manage expectations about how well the color change process works. Consider how the hair dye process works in the real world: light colors can be easily tinted any shade or hue, while dark colors need to be bleached to lighten them before they are dyed in order to actually show colors. 

In short, it’s easy to dye light-colored hair, but dark colors require a few more steps. Let’s look at how the general process works, and then I’ll discuss some tips for working with darker hair colors further down the post. 

Step 1: The New Color Layer

First, we’ll create a new layer and fill it with the new hair color you want to apply.

Open the Layer menu, and click New Layer. You can also use the keyboard shortcut Ctrl + Shift + N, or use the New Layer button at the bottom of the Layers panel.

Be sure to name your layers!

Switch to the Bucket Fill tool using the toolbox or the keyboard shortcut Shift + B. Set your foreground color to your chosen hair color, and click anywhere on the main image window to fill the new layer with color. 

Step 2: Creating Your Hair Mask

You’ll be looking at a big image filled with your chosen hair color and nothing else – so it’s time to localize the color using a layer mask. 

In the Layers panel, right-click the color layer you just created and choose Add Layer Mask from the menu. You can also use the Layer menu to add a mask, or you can use the mask icon at the bottom of the Layers panel. 

Make sure it’s set to black!

GIMP will open the Add Layer Mask dialog, shown above. Change the Initialize Layer Mask to setting to Black (full transparency) and click the Add button. 

The huge area of color will disappear, showing your original image underneath. But now we’ve got a mask to paint!

Switch to the Paintbrush tool using the toolbox or the keyboard shortcut P. Layer masks work in grayscale, so we’ll need to paint white pixels onto the mask to allow the color layer to show. Whenever you paint white on the layer mask, the color layer will be made visible at 100% opacity. 

It will look odd at first because you’ll just see areas of flat color overtop of your subject’s hair, but we’ll change that in Step 3. You can always refine your mask later, but this is by far the most time-consuming part of the project. 

Image editors have torn out their own hair while trying to mask individual strands of hair (I’ve seen it happen), so don’t feel too bad if you get frustrated and spend a lot of time on getting it just right. 

Get very familiar with your Paintbrush keyboard shortcuts. The X key allows you to swap your foreground and background colors so you can easily switch between white and black, the square brackets [ and ] are used to quickly adjust brush size, and adjusting the Opacity setting of the brush can also be helpful. 

Using the Blur tool can also help smooth out the color areas so they don’t look fake.

Step 3: The Blending Mode Question

Last but not least, it’s time to adjust the blending mode used on your color layer. Blending modes are one of the most valuable and least understood features of any image editor, and they deserve several articles dedicated to explaining them – but we don’t have time or space for that here.

It looks a bit washed out, but it’s the most natural-looking

Instead of deep-diving into how blend modes work, locate the Mode dropdown in the Layers panel. Select your color layer, and change the Mode setting to HSV Hue, down near the bottom of the list. You can also try experimenting with the Multiply or Overlay blend modes, depending on your image and your desired result.

In this example, the color layer blend mode is set to Multiply, which creates a dark but not very satisfying result for this particular image

Using Multiply will work fine on some images, but it really depends on how the rest of the image has been edited. In this case, it’s too dark to look realistic, but your opinion is your own! 

The same color layer with the blend mode set to Overlay – brighter, but still looks too vibrant and fake

The overlay mode, shown above, is a bit better, but the colors still look very saturated in the bright areas. HSV Hue is still the winner!  

You can also experiment with combining multiple layers using different blend modes to get the right effect, although this can be quite time-consuming as well. 

Working With Dark Colors

If you’re working with dark hair and you’re not getting the results you want, you can use the mask you created in Step 2 to quickly brighten things up a bit. I’m going to assume that you’re already familiar with the general process of working with masks and the Layers panel since we covered everything in the guide above. 

Here’s how to lighten your subject’s hair for coloration:

  • Duplicate your original image layer, and add a layer mask to it. 
  • In the Layers panel, click the thumbnail of the existing layer mask you made for the hair in Step 2, and press Ctrl + A to select all the contents. 
  • Switch to the layer mask on your duplicated original image, and press Ctrl + V to paste the contents of the layer mask. 
  • Click the green anchor icon at the bottom of the Layers panel to anchor the pasted content into the layer mask.
  • Open the Colors menu, and click Curves. Click at the center of the adjustment line to create a new point, and drag it up towards the top left to gradually increase the overall brightness of the hair while maintaining the shadows and highlights. 

Alternative Method: Using the Hue/Chroma Filter

If the main method isn’t working for your particular combination of color and subject, there’s an alternative method that might produce better results. It’s fairly simple, although it doesn’t give you quite the same flexibility of color changes that you get from using separate color overlays. 

Duplicate your main image, add a layer mask to the duplicate, and then mask out everything except the hair. If you’ve already created a layer mask by following along with the main guide, 

Make sure your pixel layer is selected, then open the Colors menu, and select Hue/Chroma. Adjust the Hue, Chroma, and Lightness settings until you get the desired results, and click OK!

A Final Word

Like most editing tasks in GIMP, the best way to change hair color depends on the exact image you’re editing. You might be able to use the simplest technique discussed in this post, or you might need to use some combination of all of them. 

Once you know how the general process works, feel free to experiment and see which method or combination of steps works best for your situation.

Do you have a preferred method to change hair color in GIMP that I didn’t discuss at all? Let us know in the comments below and I’ll have a look! 

About Thomas Boldt
I’ve been working with digital images since the year 2000 or so, when I got my first digital camera. I've tried many image editing programs. GIMP is a free and powerful software, but not exactly user-friendly until you get comfortable with it, and I wanted to make the learning process easier for you here.

Leave a Reply

Your email address will not be published.