LAB blending Modes

I was learnning about LAB color space when I noticed something. some of the main blending modes I use in RGB become unussable.

I started to look at LAB color space to make a smoother transition from greyscale to color in seperate layers.

I dont know the color Math very well but you guys think it is possible or worthy to make a LAB blending modes? like one to place Greyscale over Color and another to place Color over Greyscale?

I did some testings and the only blending mode that seemed to work better was “Hard Light”
https://gyazo.com/1a96f10dd103ec90bed65cde264fa7f4

2 Likes

I’m not sure it would be worth it. Lab is mostly useful for editing photographs, which isn’t what Krita is for. And Margulis book on Lab (which was the impetus for me to implement Lab in Krita) sort of unconvinced me afterwards. Lab really does impose some very weird constraints on the kind of maths that can be used.I think that other applications convert lab colors to rgb before applying blending modes, and then convert back. I’m not sure it would be worth the effort…

I was talking about it because I am big of the fan of grey-scale to color work-flow when i draw, and the hard separation on both color and black/white seemed like the perfect fit to make such a workflow to work.

I have tried all the blending modes and ways to mix in RGB before and the output result was always a bit muddy in Krita and in Photoshop alike. To me it was just a limitation that simply existed and I moved on.

But recently I started looking into LAB better and I really get the feeling even considering out of Gamut situations having a good LAB would be a good idea even if it is just to use just a bit like Photographers do.

I speak on a 3D perspective so I have to make textures for 3D assets and the ability to change HUE without tampering the rest is a really good thing like when painting skins or changing the colors of monsters, I have not yet tested it but it is something I plan to do in the future and see if a LAB workflow is a good idea or not.

On a Side Note:
I have noticed some curious things while taking a look into LAB and RGB on the CHANNELS Docker.

  1. in RGB mode the Channels are stacked as “Blue”, “Green” and “Red” or BGR inverted of what you would expect from RGB, “Red”, “Green” and “Blue”.

  2. in LAB mode the channels at weird too.
    Lightness only - Image becomes orange and blue
    A only - Image become orange and blue
    B only - Image become orange and blue
    not sure why this is but would it not make more sense if it displayed
    Lightness = Black + White
    A only = Green + Red (or black and white)
    B only = Blue + Yellow (or black and white)

  3. on the docker mode in whatever mode you are on you CAN’T seem be able to Paint on any isolated channel. Isolating channel display or view only affects the display not what receives the color. If you could acctually affect the choosen channel would be good I think.

  4. Another thing that came to my attention and i really don’t know what might be the reason considering how many factors there is is that placing the same photo on Photoshop and Krita, the channel values seem different, Krita’s colors are a bit Darker overall and seem to loose a bit of values in between big values. I used the same photos on both programs and had different color displays on the same screen while side by side and isolating their channels. I channels I tested was RGB, CYMK and LAB and Krita was alwyas a bit darker and alot darker on CYMK.

Hope it helps something

I used to work on adding blending modes, so I could provide pointers for you and maybe even join the efforts to work on adding LAB Blending modes as I wanted those too. PM me if interested.

I’m a bit late to the discussion as I only just found it.
First of all, I want to point out that Krita allows converting individual layers to differing color models, depths and profiles from the rest of the document through Layer > Convert > Convert Layer Color Space, you can sandwich them together in any combination. The color blending inside the layer and Filter Masks attached to it will use the layer’s own color model, while the blending between layers uses the document’s color model. This can be super flexible and powerful.

I paint in LAB frequently. It was one of the driving features that got me to transition to Krita, because no application I was aware of then, other than Photoshop, supported actively editing and painting in that color model. Color blending in LAB feels like the response from exposing color film stock in analog cameras, or a good tone map applied over an HDR source, without having to utilize such filters or often blending modes.
I also recommend using the Specific Color Selector docker and setting it to L*a*b*/ Alpha mode. It gives you the correct brightness transitions, seen through the perspective of LAB, where dark colors shift towards the nearest primary (red, green and blue) and bright colors shift towards towards the nearest secondary (yellow, cyan, magenta).

From experience, there are several blending modes that already work well in LAB or for which I have workarounds:
While Color (like from HSV) is disabled in the list, it can be replicated by simply disabling the Lightness channel from the Layer Properties in the right-click menu, but due to how LAB functions, black with 0% Lightness can still produce a saturated color.
Most, if not all, blending modes where 50% gray brightness is neutral, like Linear Light, Hard Light, Overlay, Grain Merge, etc., give nice results (though not sure if technically correct). They combine both subtractive and additive blending in a single layer to substitute broken blend modes like Screen or Multiply. Similar issue again, none of them desaturate towards full black or white, like Overlay in RGB would do, for example.

I have a complicated layer setup now (with Clone Layer, Cross Channel filter and Alpha Inheritance) that Tiar helped me figure out, for when I need to selectively desaturate towards full black or full white. It essentially works like the Layer Style Blend If -> Underlying Layer slider from Photoshop, which isn’t yet working in Krita.
Apart from a simpler replacement for that, what I miss most in LAB is working Lighten and Darken modes.

If specific LAB bend modes were doable without too much trouble, how would they be organized? Do they overwrite the corresponding RGB modes if the document or separate layer is using LAB, or should they occupy a category like HSI / HSL / HSV / HSY?
Filters are also a separate issue - Many work as expected, some give slightly off results, a few produce nonsense.

3 Likes