1

I've done some homework Googling but I'm still confused as to how exactly blend modes work.

So according to Wikipedia, this post and this post, the way blend modes work is to use various formulas on the value or luminance of the pixels of the blend and base layers, to calculate the result value or luminance of the result layers. However, none of these sources elaborates on what value or luminance means.

Does value or luminance correspond to value as in the HSV model or lightness as in the HSL model? I've tried mixing #ff0000 with #00ff00 (both with 50% lightness / 100% value) with the Multiply mode, but the result color is #000000 (0% lightness / value). So value or luminance as used for blend modes shouldn't be the same as value or lightness in the HSV or HSL model, right? Because whether you do .5*.5 or .01*.01, the result will not be 0.

Then what exactly is value or luminance?

And if blending modes rely solely on how much "white", "black" or "gray" a pixel contains (which sounds a lot like value or lightness in the HSV or HSL models) as suggested by the sources I'm citing here, how is the result hue determined? How does, say, #fa0000 Multiplied by #064d1e result in #060000 but not #010600 with the same HSV value?

Come to think of it, how do a pair of hues when blended together produce another hue, anyway? Is the result hue in the exact center of the segment connecting its component hue "points" on the light spectrum or something? Like when you get yellow from red and green because yellow lies dead centered between red and green?

I'm still pretty clueless about the physics of light and color perception in humans, and I'm hoping someone could enlighten me in layman's terms.

1 Answer 1

2

I think your misreading the sources, I can not find a singe mention of luminance in the Wikipedia article.

Multiply does not use luminance for anything it does just what the tin says it multiplies the RGB color components component wise. See a color is a triplet of values between 0-1 (or any other range, but so not to go into bit depth, simplest way is to think between and 0.0-1.0) Ok so your colors are #ff0000 and #00ff00. Or more simply the triplets

 R    G   G
1.0, 0.0, 0.0
0.0, 1.0, 0.0

The red values become 1.0 * 0.0 = 0.0, green is 0.0 * 1.0 = 0.0 and blue is 0.0 * 0.0 = 0.0. So you get the triplet (0.0, 0.0, 0.0)*ff = #000000.

Now to convoluted this the system may or may not account for the nonlinearity of color. But that is another quite long discussion which you aren't prepared to have, yet.

Come to think of it, how do a pair of hues when blended together produce another hue, anyway? Is the result hue in the exact center of the segment connecting its component hue "points" on the light spectrum or something?

Color is has nothing to do with the spectrum. A spectrum is just a special case of a Dirac delta spread of frequencies hitting your eye. You can not understand color if you think that color is light wavelength. Because that's not what perception of color is.

Anyway the question does not have an answer it simply depends on the blending mode. As such the modes dont have to make any sense they are totally artificial. There is no such thing as the center of the segment between colors just different interpretations of what that might mean.

To discuss what color is is way too long to be included here under this questions heading.

7
  • Wikipedia uses "value". I did catch that. Still confusing. Commented Sep 24, 2018 at 15:55
  • @Vun-HughVaw but value has nothing to do with luminance. Its just the number associated with the color component in this case. But it does not really refer to anything other than the number itself.
    – joojaa
    Commented Sep 24, 2018 at 15:56
  • Just becasue its a triplet does not mean it does noy have a value, its just a tuple or vecor of some kind
    – joojaa
    Commented Sep 24, 2018 at 15:58
  • What I'm saying is whether it is "value" as used by Wikipedia or "luminance" as used by the other sources, it's still not clear what those terms mean. Like, the "value" you use here doesn't seem to match the "value" as used in the HSV model, meaning that even Wikipedia uses the same words for two fundamentally different things and it's confusing. Anyway, if you use some kind of conversion from RGB(255,0,0) to RGB(1,0,0), it's sort of close to what's described in those two posts I cited. Maybe the authors just confused terminology. Commented Sep 24, 2018 at 16:01
  • No it does not mean the same thing as value in HSV, its just the number. The meaning is the same as the mathematical definition (see en.wikipedia.org/wiki/Value_(mathematics)) or "The value of a variable or a constant is any number or other mathematical object assigned to it.". In other words the number.
    – joojaa
    Commented Sep 24, 2018 at 16:03

Your Answer

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

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