Showing posts with label Change Color. Show all posts
Showing posts with label Change Color. Show all posts

Tuesday, May 26, 2009

Color blending mode in Photoshop

Layer blending modes: too many choices
If you look at the pull-down menu in your layers palette, you will see a dizzying number of choices with names that do not make sense without explanation. If you want to know what all of those blending modes mean, several great posts out there take the time to explain each one of them:

  • freeTime FOTO explains every blending mode and demonstrate the effect of each one on their logo (nice marketing ploy).
  • Northlite starts with a primer on color and then demonstrates blending modes with a leafy background and a rainbow gradient. Excellent concise explanations.
  • Digital Art Form's post is not exhaustive, but it is certainly methodical.
  • And speaking of methodical, check out Nathan's programming magic. This is the kind of stuff that my son just eats up. For those of us that are less skilled at programming, scroll down past the blend mode math and check out the photos. As a photographer, I appreciate how Nathan demonstrates the blend modes on photos rather than on graphics.
  • Photoshop Essentials simplifies the blend modes by grouping them into five categories. Very readable.
  • Adobe Press shows us "how blending modes think."
As much as I respect all of the above, I start to get vertigo when so much information is presented at once. And even though helpful people have gone through the trouble to demonstrate the effects of each and every blending mode, I am left unsure about practical use.

A book suggestion
I think that Matt Kloskowski's Layers book is the best thing out there for people like me (i.e. people who prefer not to be overwhelmed), because it focuses on the layers features you will actually use. In fact, chapter two of his book cuts the list of 25 blending modes down to the three modes he deems the most useful (multiply, screen, and soft light). That's not to say that he doesn't use other modes in the book, but simply that he keeps it practical.

My own top three blending modes are multiply, screen, and overlay (which is almost the same as soft light). But in honor of the May monthly special on "color," I decided to dedicate this post to the "color" blending mode with an emphasis on practical use in photo retouching.

Color blending mode: what it does
Let me quote Northlite's pithy definition: "Color [blending mode] changes the hue and saturation of the lower layer to the hue and saturation of the upper layer but leaves luminosity alone."

Not making sense yet? Let's look at an example. I will start with a color photo:
In the layers palette, I add a new empty layer. Just to show how the color blending mode works, I will fill that top layer with white by using the paint bucket tool with the foreground set to white.
This leaves me with a plain white screen. Next, I choose "color" from the layer blending modes.
Because the color blending mode leaves all of the shades of gray (i.e. the luminosity) intact, my white top layer blends down to create a black and white image.
Although I would recommend different methods for customized black and white conversion, the example above should help you visualize what the color blending mode changes (hue, saturation) and what it leaves alone (luminosity).

And now on to real-world use...

Toning an image with color blend mode
If you fill a new blank layer with any color (as I did with white above) and set the blending mode to "color," you will get a toned image. So this time I will use a beige color on the top layer.
The result is a nicely toned image:
This is exceptionally easy, because I go straight from color to a toned image. Change the color of the top layer, and you change the tone:

Enhance or change color selectively with the color blend mode
Two more tricks with the color blending mode start with the same steps as above, but then modify the top layer in one or both of the following ways:

1. Play with the opacity
If you lower the opacity of the top layer, your background color will start to come through. This can look very ugly at 60%, but can be very useful at 15% to either add or correct a color cast. In the photo below, I applied a yellow layer at about 20% in the color blending mode. The right half shows the new warmer version, and the left half is the original more ruddy complexion. Just to make sure you could see a difference, I set the opacity higher than my ideal.
2. Color blend + layer mask = selective color change.
Add a layer mask to a toned image, and then paint color in or out. I usually prefer to paint in rather than out, so I add a layer mask filled with black by clicking the layer mask icon while holding the alt key.
Now I can use a white brush (b) on the mask to paint in color selectively. If blue is my top color, and I mask out everything except the eyes, I end up with...
AAARRRGHHH! Ridiculously fake bright blue eyes!!!! But if I dial down the opacity, I get a realistic change:
Or I can do the same thing to shift his hazel eyes more toward green:
Since the color blending mode leaves the luminosity alone, you get all of the shading of the original image. Even the super intense blue might be believable if more people in the world had the eyes of Paul Newman. Back to the real world...In my own work, I never have any reason to change hazel eyes to blue or green, but I might want to enhance a person's actual eye color if a photo didn't do it justice.

In the end, our only potential obstacle to realistic color manipulation is self-restraint (the lack thereof). But then again, who says realism has to be the goal? Start to experiment with the color blend mode and you will appreciate its ability to create highly stylized effects.

Friday, February 27, 2009

Change Background color in Photoshop

When it comes to teaching you how to change the color of an object in Photoshop (my apologies to Elements users, this one is just for Photoshop), most tutorials make it look deceptively simple. A few clicks and it's done. Here is why it's deceptive:

They often use stock photos, such as the one above. The perfect definition between the red car and the white background means that making a selection is a piece of cake. Or let's say I wanted to change the background in this photo of a guy wearing a polo shirt:

The studio quality of the photo makes it extremely easy to select the black and change it to whatever color I want (although I must admit that in this case the hair might pose a problem).

So let's get real. In your own non-pro, non-studio, real-world photos, you will have to deal with textures and color variations that make selecting and changing a color a lot more problematic than some would have you believe. My goal in this tutorial is to give you a way to change a background color in a real-life setting.

The tutorial
In the photo above, the wall has a stucco texture that gives it variation in color. The suit provides a fairly good contrast, but nowhere near what you get in a stock photo. Shadows from the guy and the chair create darker areas on the wall which will create a halo of the old color if not meticulously selected. If you read my last tutorial, you know that I want you to get results without the meticulous work routinely performed by pro retouchers. So here are the steps:

1. Open your image and copy the your background layer and work on that layer for good measure (Mac: Command—J; PC: Ctrl—J). From the top menu, choose Select-->Color Range and you will get the following dialog box:

With the "Selection" option active (in the box below the photo), click in the photo (either the big one or the one in the dialog box—both work) on the color you want to change. Here is what one click got me:
Everything you see in white is selected. Clearly, I am not done.

2. Because the wall has variations in color, I need to add to my selection. In the dialog box, check the eyedropper tool with the + sign after it. This means that you can now click as many times as you like and add to the current selection. I clicked once on a darker part of the wall and got the following result:
Not bad, but still not done.

3. At this point, you have two choices: continue to click until you have a good selection or play around with the "fuzziness" slider. Here is what happened when I increased the fuzziness slider to "60":
Better, but I still haven't selected all of the wall. Your best bet is to continue to add to your selection both by clicking AND by changing the fuzziness slider.

AN IMPORTANT NOTE: You will notice that my selection has already picked up the shoes, the pocket square, and the reflections in the windows. And as I continue to select more color variation in the wall, this problem will only get worse. But have no fear. Over-selecting is far better than under-selecting. We will deal with the problem areas later.

4. Once you have a good selection, click OK. You will now see the "dancing ants" (as they are sometimes called) all around your selected area. At this point, the selection still needs some fine tuning. In the toolbar at the left, click on one of the selection tools such as the lasso tool (L) or the quick selection tool (W). You aren't going to use those tools, but you are going to steal a feature that they activate. With one of those tools selected, look for the "Refine Edge" button in the menu bar at the top:

Click on it to get a dialog box that will help you better define your selection:
Here, you can see exactly what you have selected and you can adjust the radius of the edge, the contrast, the smoothness, etc. The nice thing about having a preview mode is that you can see the effects that the sliders produce. But why complicate things? I recommend sticking mainly to the "Contract/Expand" slider. What I want to do here is make sure that no shadow (say, around his hair) is left unselected. I expanded my selection a lot (71%), clicked OK, and was left with an even better selection of the wall and an even worse side-effect of unwanted selected elements (look at the shirt and tie, for example). What to do?

5. With those dancing ants still doing their thing, hit Command—J (Mac) or Ctrl—J (PC) to put your selection on a new layer. If you turn off visibility in the other layer(s), you will see exactly what you saw in the "Refine Edge" dialog box: the selected part of the image. As you do the next steps, you can toggle the visibility of the other layer(s) as needed.

6. Time to change the color. This is where it gets fun. With your top layer selected, go to Image-->Adjustments-->Hue/Saturation to get the following dialog box:
As you can see, I left the bottom layers visible so I could see what the wall color would look like against the windows. In the dialog box, make sure that "Colorize" is checked in the lower right-hand corner. You are now free to experiment with hue (i.e. the color), saturation (the intensity), and lightness/darkness (I'll stop insulting your intelligence on this one). This stage is simple and fun, but you will notice that I still haven't dealt with those shoes, shirt, and other areas I don't want to change. We'll take care of that next. First, settle on a color and click OK.

7. With your top layer selected, go to the layers palette and add a layer mask:
Now you will want to make only the colorized layer visible:
8. With the mask selected, choose a brush (sized according to the areas of color you want to eliminate) and simply paint out the parts of the image where the color change is unwelcome:
In the image above, I am painting (with black set as the foreground color in the left menu bar) over the shirt and tie. I will then paint out the shoes and the windows, and I am left with a new wall color that retains the texture and variations of the natural wall.

Here is the BEFORE:
And the AFTER:
Whether the actual color change is better or worse is up to you, but I hope I have given you some practical techniques that work for real-life photos.

A few final words of advice:
  • If your saturation and lightness/darkness settings are too extreme, you will begin to lose the natural texture and variation that make a background realistic.
  • My photo had a decent amount of contrast between the background and the person. Imagine if he had blond hair and was wearing a beige suit. Similar colors would require more precise selections and masking. Unless you are a person of infinite patience (and if so, consider a job as a retoucher), you might want to avoid such situations.
  • Experiment. Deviate. The beautiful thing about Photoshop is that there are a dozen ways to do almost anything. The important thing is to get a result that you like.