-1

What is the color space behind the color blend mode in photoshop, HSB or HSL

B stands for brightness L stands for lightness

But what is the true color space of Hue/ Saturation/Color/Luminosity blending mode in PS

I'm so confused。

I have all of them tested, but HSB or HSL cant match the result.

1

2 Answers 2

1

Let me write and answer for you, although this belongs more to computer graphics.se than here.

This is not the answer you want its the answer you need. The mathematics behind color are very complicated. In fact nearly every system out there, every introductory class on color gets it terribly wrong. Mainly because they use a close enough approximation or an older definition on things and confusion of what the goal is. (it is my opinion that rocket science is easier because the goal is not as opaque)

The problem is that many of the explanations out there aren't wrong, they are kind of half truths. They get you halfway there by lying to you, which makes it hard to unlearn the things. Second is that our common language is incapable of conveying the needed complexity of the matter. We simply do not have a enough words for different aspects.

What is color? There are wildly different answers to this depending on who you ask and the definitions are not compatible. The talk about wavelength having a color that you were presented in a physics class is half right. Wavelengths do have color, but colors aren't wavelength. So the usefulness of this information is almost nil.

Ok so insert crude simplified ASCII graphics graph:

+--------------+     +--------------+
| Light Source |---->|  Reflection  |<- 
+--------------+   / +--------------+  \    +------------+  +--------+   +-------+   +------------+
          \       /                     +-->| Eye optics |->| Retina |-> | Brain |-> | Experience |
           \     \   +--------------+  /    +------------+  +--------+   +-------+   +------------+
            \-----\->|    Filter    |
                     +--------------+

ASCII Image 1: Quite simplified model of how our visual system works.

So a graphic designer is interested in the Experience of color, while a color vendor might be interested in repeatability and thus of the part before eye optics. whatever the case following holds true:

  • RGB values are not color definitions. hey are just signals to the hardware. Each individual hardware produces different color!
    • SO without specifying that your system is calibrated/Emulating standard XXX YYY it is unknown what the color actually is.
    • If the device has not actually been calibrated recently then we don't know what signal reaches users eyes.
  • the Brain is exceptionally complicated.
    • Just the physical structure of retina does some color/shape processing!
    • The white balance in a human brain is tricky to understand etc... ...

Ok now we are ready to understand the question a bit better. Why is HSB or HSL different? Well sometimes they are and sometimes they aren't? This entirely depends on how you calculate lightness and brightness.

Lightness is a bit controversial, how do you calculate it? Well there is several different calculations you could make. You could just average the R,G and B values. But then if you do that then you'd have people complaining that your blues are unnaturally of different lightness/brightness than your yellows and reds.

Simply the differences stem from how much mental work each individual implementer was putting in. So HSL and HSB dont have definitions that is just one formula, and the formula depends on.

  • What the developer was trying to model
  • What kind of hardware the developers happened to have at the time
  • And whether or not they implemented calculation in integer arithmetic or not.

WTF? Well, there is no scientific motivation in turning color into polar coordinates. Its just considered more elegant of a shape than that and artists have done the transformation because it suits them in the past so there that.

2
  • I always enjoy your explanations about color science. Even if it's just surface scratching. Most designers (including myself) don't really have the prerequisites to understand these matters in depth. To me it's been a relief to finally realize that there's so much hidden complexity. All those half truths and simplifications about color wheels, RGB/CMYK etc. I've been told through the years made me think I was stupid because I couldn't understand the bigger picture. But really it was because the information I was given was wrong or incomplete at best so it can never add up.
    – Wolff
    Mar 19 at 14:46
  • So when a client wants me to ensure that a color will look exactly like they feel it looks on their uncalibrated screen when printed with CMYK on uncoated paper, printed with a Pantone ink on coated paper, shown in RGB on their website and printed with silk screen on textile, I can't explain in detail why it's impossible, but I know they think it's easy because they don't acknowledge the underlying complexity.
    – Wolff
    Mar 19 at 14:51
0

Adobe gives no exact numerical info of the blend modes. You find easily only more or less vague qualitative explanations from Adobe's own guides and 3rd party tutorials.

One source for better info exists. It's the PDF specification. There's a good reason to believe that Adobe uses the same blending formulas as used in PDF readers. Otherwise Adobe's stuff wouldn't give the same looking results, which would be intolerable.

Here's the PDF spec snippet which shows the blending modes as numerical formulas: https://printtechnologies.org/wp-content/uploads/2020/03/pdf-reference-1.6-addendum-blend-modes.pdf

From it you can find that blend mode color takes the luminosity of a pixel from the backdrop image. Foreground image - or "the source", as said in the document - gives the hue and the saturation.

You asked the used color space. It's RGB for RGB images. Actually that variation of RGB which is taken into use in Photoshop's color settings. HSV (the same as HSB in Adobe software) and HSL are alternative ways to present RGB-numbers, nothing more nor less.

In some blendings hue, saturation and luminosity are used as intermediate variables. They are calculated from R,G and B. Finally R,G and B are recalculated. The formula for the luminosity is this (a screenshot from the linked document)

enter image description here

Hopefully this formula is actually just the wanted one, no matter it was not asked.

CMYK images are at first converted to RGB (respecting the color profiles). Then the blending is done like for original RGB images. Finally the image is converted back to CMYK.

This all is explained in the linked document. To understand it one must have at least high school level math knowledge in perfectly sharp condition and be able to parse even half page long conditional formulas. A computer programmer needs the same skills, I guess.

I must add that in Photoshop the Lab color mode also knows blend modes. PDF spec knows nothing of it, so only guesses are possible of blends in the Lab-mode. My guess is that the luminosity is replaced by the L of the Lab-mode. Hue and saturation are replaced by the hue and chroma of the polar HCL-form of the Lab system. But I cannot prove it.

Photoshop doesn't explicitly use HCL. It can be found for example in GIMP.

1
  • you missed the fact that the function is most likely calclated on linear rgb values not gamma corrected ones.
    – joojaa
    Mar 20 at 2:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.