New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Photoshop's blending formulas

From: Photoshop Masking and Compositing: Advanced Blending

Video: Photoshop's blending formulas

All right, gang! Now we are going to actually get into the underlying arithmetic formulas that are associated with the blending operations here inside Photoshop. And we're going to take it pretty easy because there's an awful lot of stuff going on, even if you like math, by the way. The file I have open is called Blend mode math.psd, it's found inside the 02_math folder and you can see that we've got the blending functions listed over here on the left hand side, the pixel formulas are listed here in the middle and then I've also provided a description of each one of the formulas, because it's very possible that you might look at A+ B-1 and think, all right, but I don't have any idea what in the world that would possibly mean.

Photoshop's blending formulas

All right, gang! Now we are going to actually get into the underlying arithmetic formulas that are associated with the blending operations here inside Photoshop. And we're going to take it pretty easy because there's an awful lot of stuff going on, even if you like math, by the way. The file I have open is called Blend mode math.psd, it's found inside the 02_math folder and you can see that we've got the blending functions listed over here on the left hand side, the pixel formulas are listed here in the middle and then I've also provided a description of each one of the formulas, because it's very possible that you might look at A+ B-1 and think, all right, but I don't have any idea what in the world that would possibly mean.

So we'll walk through all of them here. Now I have tried to document every one of the blend modes, with the exception of four. Normal and Dissolve, because they don't use any special math, and then Lighter Color and Darker Color which are composite modes that are based on Lighten and Darken respectively and we'll see how they work later. And then finally, despite a lot of research, I was not able to verify the formula for Soft Light. None of the formulas that I found out there actually worked the way the Soft Light blend mode does.

Anyway, with that in mind here's what's going on with every single one of these formulas. They are based on the letters A and B . A represents a pixel on the active layer, B represents that same pixel on the underlying layers that is to say in the background. So A is active, B is background and that's really all there is to that. Notice also over here where the descriptions are concerned, I have this little caution icon. Any of the blend modes that include those caution icons may and probably will result in some degree of clipping; either you'll be clipping to black or to white.

Any of the blend modes that do not include caution icons can not clip. They will not introduce any form of clipping, so they turn out to be the safest and typically the most useful modes. We'll start off here with the basic Opacity formula. I've re-showed you this one at the beginning of Chapter 2 of my masking and compositing fundamentals course, but let's go ahead and review. You may recall that Opacity is represented by the Greek letter alpha which is where the alpha channel gets its name.

And so to calculate Opacity, you multiply that Opacity value and you would standardize it as well. So 100% Opacity would be 1, 0% opacity would be 0, 50% opacity would be 0.5, and so forth. So you multiply the active pixel by the Opacity value and then you take 1 minus that Opacity value, 1-a, which is the inverse of the Opacity value. Any time you see 1 minus anything in these pixel formulas that means you're finding the inverse and in this case, we're multiplying the inverse of the Opacity value by B that is that background pixel.

So if the Opacity was 70% it'd be 0.7 times A and then 1-0.7 would be 0.3 for 30% B. So it'd be 70% of the active layer with 30% of the background layer; pretty easy to figure that one out. And all it is, is a percentage based pixel mix. It's as if we are mixing a beverage, let's say; it's 70% one ingredient and 30% of another. All right! Now let's take a look at the first darkening mode which is Darken. All it does is locate the darkest pixels.

So in other words, where any single pixel is concerned, it tries to find the minimum. So if A is darker then A wins and if B is darker B wins. Whichever pixel is darker is the pixel that you end up seeing after you blend the images together, which means, you end up getting a lot of harsh transitions, not one you'll be using on a regular basis, but still, there it is. Multiply as I was saying totally great mode incapable of clipping as you can see over here, no warning. And all it does is multiply the two pixels together.

We saw how that worked in a previous exercise, the product of that equation evenly darkens the composite image. Now I'm also including just one mode as it relates to interacting with the Opacity value, because I want to give you a sense of how that works. So let's say, we're multiplying the active layer and we're setting it to say 70% Opacity. In that case, we would start things off by taking the product of the two images, so we would multiply them together, and then Photoshop would treat that as a composite version of the various layers and it would multiply alpha times that composite and then mix it in with 1-a of the background.

Notice there is nothing special going on here. That (1-a)B is the same as it was when we're working with the Normal Mode, let's say. So as a result, we would have, in our case, 70% of the multiplied image blended in with 30% of the background image and so we get a translucent product and that's the way it works across the board. So any time that you're mixing in Opacity along with a blend mode, you were multiplying the Opacity value times the blended image and mixing it with the opposite of the Opacity value assigned to the background.

That gives you at least an introductory sense of how the math works where blending is concerned with Photoshop. In the next exercise, I'll show you more.

Show transcript

This video is part of

Image for Photoshop Masking and Compositing: Advanced Blending
 
Expand all | Collapse all
  1. 1m 43s
    1. Welcome
      1m 43s
  2. 33m 15s
    1. When in doubt, blend
      2m 20s
    2. Where to find blending options
      4m 10s
    3. 27 blend modes, 6 groups
      4m 23s
    4. Opacity vs. Fill Opacity
      4m 41s
    5. The "Fill Opacity Eight"
      4m 59s
    6. Blending adjustment layers
      4m 43s
    7. Blend mode shortcuts
      7m 59s
  3. 27m 3s
    1. The power of standardized arithmetic
      6m 58s
    2. Photoshop's blending formulas
      5m 27s
    3. Darken formulas vs. lighten formulas
      4m 15s
    4. Contrast mode formulas
      7m 28s
    5. Inversion, cancelation, and HSL
      2m 55s
  4. 17m 50s
    1. Normal mode vs. Dissolve mode
      2m 11s
    2. Making a dynamic Dissolve effect
      2m 21s
    3. Creating a Dissolve text effect
      4m 48s
    4. The Behind and Clear modes
      3m 2s
    5. Filling a stroke with Behind and Clear
      5m 28s
  5. 43m 24s
    1. Darken vs. Darken Color
      4m 25s
    2. Creating filter effects with Darken
      5m 0s
    3. The Multiply and Burn modes
      6m 27s
    4. Cleaning up scanned line art
      7m 30s
    5. Comping line art against a photo
      5m 12s
    6. Colorizing comped line art
      5m 14s
    7. Masking with a darken mode
      3m 59s
    8. Refining a mask with Multiply
      5m 37s
  6. 33m 36s
    1. Lighten vs. Lighter Color
      2m 29s
    2. Creating filter effects with Lighten
      2m 47s
    3. The Screen and Dodge modes
      4m 35s
    4. Blending white type, darkening shadows
      3m 2s
    5. Creating a classic double-exposure effect
      3m 49s
    6. Making dark line art bright
      5m 11s
    7. Masking with a lighten mode
      5m 4s
    8. Refine, filter, and blend
      6m 39s
  7. 35m 18s
    1. Overlay, Soft Light, and Hard Light
      5m 2s
    2. Vivid, Linear, and Pin Light
      4m 2s
    3. The amazing Hard Mix mode
      3m 51s
    4. Two variations on a single mode
      5m 37s
    5. Adding clarity with a contrast mode
      4m 9s
    6. Creating a glowing, soft-focus effect
      3m 38s
    7. Blending an image with a paper texture
      4m 11s
    8. Turning flesh into stone
      4m 48s
  8. 18m 10s
    1. Difference, Exclusion, Subtract, and Divide
      7m 7s
    2. Comparing seemingly identical images
      3m 25s
    3. Creating type that inverts any background
      3m 30s
    4. Making inversion type black and white
      4m 8s
  9. 16m 57s
    1. Luminosity, Color, Hue, and Saturation
      3m 29s
    2. Colorizing artwork with layers
      7m 24s
    3. Correcting skin tones with Hue
      6m 4s
  10. 14m 57s
    1. Using the This Layer slider option
      6m 44s
    2. Using the Underlying Layer slider option
      3m 16s
    3. Achieving greater control with Blend If
      4m 57s
  11. 48s
    1. Next steps
      48s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.