Why no darken and lighten blend modes in LAB?
jfriend
Registered Users Posts: 8,097 Major grins
Anyone know why you can't use the blend mode "lighten" and "darken" in LAB mode? I have a technique for removing skin shine that uses the "darken" blend mode and I'm bummed that I can't use my skin shine removal technique when I'm in LAB mode. Since LAB has luminosity already separated out, it seems like it would be trivial to implement the lighten or darken modes.
--John
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
0
Comments
Lighten and darken are meaningless concepts for the a and b channels. In RGB or CMYK, if a layer is in either of those modes, each pixel, in each layer, for each channel, is evalutated solely on the basis of its value and the lighter value in each case is displayed. There is no "value" in a and b, just more of one color or another.
Now, a good followup question would be "What's going on with Screen and Multiply?" which LAB does allow, and which also involve calculations based on the value of each pixel.
You can do the experiment for yourself: Pop a flat swatch of color on top of any image. Set it to multiply (or screen). Duplicate and convert to LAB without flattening. The effect is clearly different, with LAB, in both modes, enhancing the color much more so than the RGB version. A quick check of the a and b channels shows that, while something is taking place with the interaction between the two layers, it makes no difference whether the color swatch is in Screen or multiply mode; the effect is identical for both. Only the Lightness channel changes from one to the other.
I suppose you could copy the Lightness channel as greyscale, do your Lighten/Darken moves there and copy back, but there will be a color shift that wouldn't happen in RGB.
—Korzybski
I understand that lighten and darken are meaningless for the a and b channels, but the answer is staring you in the face by just looking at the L channel. What I expected and wanted the darken mode to do was this:
For each and every pixel, compare the L channel value in this layer with the value from below. If the L channel value in this layer is less (darker), then take the L, A and B value from this layer. If not, take the L, A and B value from below. Wouldn't that would have given me something very similar to what it does in RGB? Is there any way to do a blend like this in LAB?
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
You can use Lighten mode on a brush if you've got the L channel only selected. Then hit the tilde key to see all channels, even though only L is selected, and brush away.
Dgrin FAQ | Me | Workshops
Except, I'm actually trying to change the color. I ony want to change the color when the the replacement color is darker than than the original and I can't figure out how to do that in LAB mode - it seems like it should be doable because it's actually an easier calculation in LAB mode than RGB, but I can't find it.
What I'm trying to figure out how to do in LAB mode is the method for getting rid of skin shine that I described in this posting (the third step about removing skin shine). That posting was all in RGB mode, but I'm trying to move more of my portrait workflow to LAB and couldn't do this step in LAB so I stayed in RGB.
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
I believe the answer you seek is here.
Dgrin FAQ | Me | Workshops
Thanks for the response. I think that technique works better for blown areas than it does for shine, but the general idea is that I can experiment with using blendif sliders to control the blend (kind of do a manual darken mode by picking the darken threshold myself rather than using darken to do it automatically). Since a particuar sampled color I'm painting with has a known L value, I just need to set the blend-if slider on the L channel to just below the sampled color and I'd effectively have a "darken" mode. I do use a different sampled color for each spot I'm working on shine so it might be hard to find one blend-if setting that works for all the shine areas as well as the darken mode works.
The challenge with shine versus blown areas is that you often have normal skin texture mixed in with the shiny areas and I'm trying to find a method that knocks off the shine, but preserves all existing texture so the skin doesn't go flat. The darken mode in RGB mode does a great job of that and it's incredibly easy to use. It just preserves anything darker than my sampled color and paints anything brighter than my sampled color to be the sampled color. The only way I can see to make the chapter 8 techinque do this is to try to manually find a blend-if threshold on the L channel where all texture is below the threshold and all shine is above the threshold. It could work. It's a slight bit more work than just using darken in RGB and not quite as flexible if different parts of the shine on different parts of the face want different thresholds. But, worth a try. If all else fails, I'll just have to do this step in RGB before I convert to LAB.
I'm still befuddled that you can't directly use darken somehow in LAB mode because the algorithm seems trival (even easier than in RGB). If L(top) < L(bottom) use top layer pixel, else use bottom layer pixel.
Off to experiment.
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question