Colorize Saturation Slider

P
Posted By
Phosphor
Jul 9, 2003
Views
2749
Replies
63
Status
Closed
When adding color to a grayscale image via Image>Adjustments>Hue/Saturation with the Colorize box checked, the Saturation slider in the Hue/Saturation dialog box defaults to "25".

That number does NOT represent the resulting saturation. It does not represent a percentage change of the foreground color saturation. And it is, of course, not related to the original grayscale image saturation because the saturation of gray is zero.

SO JUST WHAT DOES THIS [expletive deleted] SATURATION SLIDER REPRESENT ???

George

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

W
whozit
Jul 9, 2003
Nice rant, George, feel better now?

Good. Now try giving us more REAL info, like:

What steps did you take to get you to this level of frustration regarding the colorization of GRAYSCALE (keyword here being "gray"…) images, and what exactly is it you are trying to do???

Sorry, but since Ms. Cleo got busted for fraud, the Psychic Adobe hotline seems to be less than stellar in solving obtuse slider complaints.
P
Phosphor
Jul 9, 2003
Ol’ Whozit,

Not to worry. I wasn’t upset. Just a way of expressing a situation which defies explanation.

I have no immediate need to add color to a grayscale image. But I have a continuing interest in how PS works. In this instance I am trying to decipher the action of the colorize feature in the Hue/Saturation dialog box.

If you wish to add color to a grayscale image via the colorize feature, set the foreground to the color of your choice. The only foreground datum that will be utilized is its hue, so use the HSB color scheme, set H and let S and B be whatever they happen to be.

The resulting hue is going to be that of the foreground, while its other properties will be determined from the image and the saturation and lightness sliders in the Hue/Saturation dialog box.

The Lightness slider is an easy read. The number associated with it is the percentage by which the image’s luminosity changes. By default that setting is 0, meaning the luminosity is to be preserved if you don’t move the slider from it’s default position.

The saturation slider is another matter. As I have said, the number associated with it is NOT the resultant saturation, not a percentage change of the foreground saturation, and certainly not a percentage change of the image saturation (which is zero). Thus, my question: what IS it?

By the way, you can use this method to CHANGE the color of an RGB image—to sepia, say (and it was in doing so in another thread at Tony’s suggestion that I ran across this enigma). But the problem reduces to colorizing grayscale, since the RGB image is effectively reduced to grayscale before it it is re-colorized by the Colorize feature. In the reduction to grayscale, image luminosity is retained.

George
P
Phosphor
Jul 9, 2003
Tony,

Thanks for your interest.

…. it represents the saturation of the particular foreground color, whatever that may be…"

Not to waste words…No. The saturation slider value has nothing to do with the foreground color saturation. They are uncoupled.

The ONLY parameter used from the foreground color is its HUE. Prove this for yourself by keeping the foreground hue constant and varying the foreground saturation and brightness all over the map. The colorized result will be the same.

"…the saturation slider wouldn’t have to do with the overall degree of saturation in the image, but with the amount of saturation of the color…"

With that I can agree. saturation is a pixel, not an image, characteristic. It is an inverse measure of the extent to which the pixel’s color is diluted by gray. Only if one or two of the RGB components is zero can a color be 100% saturated—because only then does it have no gray in it.

George
Y
YrbkMgr
Jul 9, 2003
George,

You’re brighter than I on this kind of thing so I will "volley" for the sake of understanding.

The saturation slider value has nothing to do with the foreground color saturation. They are uncoupled.

Agreed. Foreground color HUE is what drives the default Hue value in the Hue/Sat dialog when Colorize is checked.

BUT… I think that the saturation slider in the Hue/Sat dialog box, when Colorize is checked, acts EXACTLY the same as the Saturation slider in the color picker.

Here’s what I did. It doesn’t matter what color, but…

Set the foreground color to a Hue of 0 (0 degrees on a color wheel). Then I opened the Hue/Sat dialog, and checked colorize. The bottom most bar is the current color – forget the image effects because the blending obscures (IMO) what is happening. Just look at that bottom most color bar.

Slide the saturation slider all the way to the right, 100% sat; that color in the bottom most bar IS the same HUE as the foreground color.

So what I did was that I worked on two images side by side (the same image). On the first image I used a Colorize with pure red (hue=0) as my foreground, and I set Saturation to 50.

On the second image, I added an adjustment layer of Solid Color, and chose the same Red (Hue=0), but changed the saturation to 50. Then I had to play with blend modes and it appears that Overlay is close to what happens in colorize.

But the blending mode differences between Colorize and Overlay notwithstanding, you can see that they are (more or less) the same color.

This isn’t the best experiment because again, I don’t know how the blend modes really work and what Colorize really does. But for the purposes of proving this to myself, I’m satisfied.

So in summary, I contend this: the Hue/Sat dialog is driven only by the Hue of the foreground color. The saturation slider does exactly what one (I) would expect in that it allows you to vary the saturation of the color used in blending in the Colorize mode, just as Saturation would allow you to do from the color picker and using a different blend mode (such as overlay).

Could be I’m way off, but it seems as though the slider does just what it implies.

Peace,
Tony
P
Phosphor
Jul 9, 2003
Tony,

It’s not that I’m brighter than hue—more saturated perhaps!! :-}

Leave blend modes out of your analysis. You are introducing another variable into a puzzle that needs to be simplified rather than made more complex. Isolate your variables.

George
P
Phosphor
Jul 9, 2003
Tony,

Well, you are actually getting warm.

The colorize feature in the Hue/Saturation dialog box corresponds closely but not exactly to the Color blend mode action with the top blend layer hue and the top blend layer’s opacity equal, respectively, to the foreground hue and the colorize saturation slider value.

For the two cases I ran, the equality was right on at 25% opacity (25 saturation slider setting), slightly different at 50%, and not too acceptable at 100%. However, at 100%, the high color value had gone all the way to 255 and when that happens you can expect anomalies.

So, a preliminary look suggests that the Colorize feature acts nearly exactly like the Color blend mode with the Colorize Saturation setting corresponding to the Color blend mode opacity.

I think you put forward a good lead.

George
P
Phosphor
Jul 9, 2003
Tony,

Upon closer scrutiny, my suggested equivalence or near equivalence of Color blend mode opacity and the Hue/Saturation Colorize saturation slider value doesn’t hold up.

I can obtain just about the same result with Colorize as with Color blend mode, but I can’t claim a close-enough correspondence between the opacity setting of one and the saturation setting of the other to equate them quantitatively.

George
Y
YrbkMgr
Jul 9, 2003
I can obtain just about the same result with Colorize as with Color blend mode

Agreed. After I did Overlay and posted my answer, I saw that Color was a closer representation.

But to take your advice, there is a HUGE variable that skews the observed data – to wit, the blend mode itself. We don’t know what Colorize really does and to what degree it is similar to Color (or any other) blending technique.

Also, I’m not sure why you’re adding Opacity to the mix of the Color Blend mode.

With that in mind, I was simply investigating the effect of the Saturation slider. And I feel confident, based on implied data not empirical, that adjusting the Saturation slider in the Hue/Sat dialog, using a Colorize "blending mode" (if that’s what it really is) is the same as using the Saturation values (or slider) in the color picker window.

That is to say, it affects the color we see, based on the "base" hue, to the same degree. What screws it up is the blend mode differences.

I don’t know how to set up an experiment to prove one way or the other, but what I observe is this:

The saturation slider in both the color picker dialog as well as the dialog for the Hue/Sat perform the same function and are percentages of saturation from 0 (no saturation) to 100% (full saturation).

So maybe I’m missing what exactly you’re saying. Let’s try it this way:

Blending mode/Colorize aside since that introduces a variable we can’t control for, what exactly are you seeing that makes you question the function/effect of the Saturation slider in the Hue/Sat dialog?

Peace,
Tony
P
Phosphor
Jul 9, 2003
Tony,

OK, I’ll spell out exactly what’s bothering me. Just so we’re on the same page, do this:

Create a rectangular patch on a new document in RGB mode with white background.

Fill the rectangle with mid-gray (128/128/128) and select the square.

Set the foreground color to Hue = 30 deg, Sat = anything, Brightness = anything.

Click Image>Adjustments>Hue/Saturation.

Check the "Colorize" box. Leave the Saturation slider at its default position (reads "25"). Don’t change the lightness slider (it’s at mid-position meaning no change of luminosity). And leave the hue slider alone.

With the Info palette in sight, move the cursor inside the square. Read Hue = 30 deg, Saturation =39%, Brightness = 63%.

How do I relate the 39% resultant saturation to the Colorize Saturation slider reading of 25. The 25 is clearly not the resultant saturation. If the 25 represents a percentage change in saturation, the change is from what base?

Believe me I’ve postulated a lot of possible base saturations. Like maybe it is the minimum saturation possible for the hue chosen—going lower than the minimum would interchange the middle-valued and lowest-valued colors, thus flipping the hue to a different 120-degree sector. I have not yet found the key. That’s what I seek.

George
Y
YrbkMgr
Jul 10, 2003
The 25 is clearly not the resultant saturation. If the 25 represents a percentage change in saturation, the change is from what base?

I don’t know that you can really conclude that. I don’t believe that 25 represents the percentage of change. Rather I think it replaces the function Sat slider from the color picker in allowing you to choose the color.

Use the same example as an adjustment layer of Solid Color with a blend mode. You set the color (HSB), and then some mathematics come into play into how the layers are blended.

Clearly with an adjustment layer, you are setting Saturation at "X", but with a blend mode applied to that layer the resultant saturation, i.e., the post blend saturation should be different.

That’s how I think about the colorize issue.

So put another way, do the same experiment with a Solid Color adjustment layer and measure HSB using the info pallet after you apply the blending mode. Is the saturation the same as it was for the solid layer (the color you chose)? I wouldn’t expect it to be.

So your result of 39% makes perfect sense to me (albeit not linear sense in that one can predict the outcome mathematically – unless you’re Chris Cox). You are blending unsaturated with saturated – the result should be different than either of the two – or am I way off in my thinking?

Peace,
Tony
P
Phosphor
Jul 10, 2003
Tony,

The blend modes—all of them—have straightforward algorithms and all of them without exception are controlled by the opacity of the blend layer. The opacity merely mutes the blend effect. At zero opacity, it is as if the blend layer does not exist. At 100% opacity the blend has full effect. For opacities in between these limits, the effect is reduced as opacity is lowered.

The Colorize feature MAY possibly invoke one of the blend modes (Color blend comes closest), and the saturation slider MAY act as a throttle (like blend opacity) rather than conventionally, but that is not sitting well with me. I am still looking for a more literal application of the "saturation" slider with the slider value having an explicit relation to the resultant saturation.

Gotta go off to a meeting.

George
Y
YrbkMgr
Jul 10, 2003
George,

. I am still looking for a more literal application of the "saturation" slider with the slider value having an explicit relation to the resultant saturation.

Understood, but I don’t think you’ll be successful. Ask yourself this: What is the literal application of the Saturation slider in the Color Picker window?

IMO, they are exactly the same. Only you cannot measure (or predict) the effect when using colorize because another function (blend) takes over.

Put another way, it’s like trying to determine the saturation used on an image that has a sepia tone applied. The ONLY way to do that as far as I know, is if the image had an adjustment layer and you looked at the params of the adjustment layer. You cannot determine it from the flattened image, if you know what I mean.

So it sounds to me like you are trying to correlate the saturation slider with how the image will look – you can’t since the colorize blend mode ultimately decides how that color (HSB) will be integrated in the image.

Again, I contend that the 25% saturation of the color is just that. It’s a hue of "X" with a 25% saturation, and 100% lightness. The same that would appear in the color picker window, as evidenced by the bottom most color bar in the Hue/Sat dialog.

Anyhow, that’s my take on it.

Peace,
Tony
P
Phosphor
Jul 10, 2003
Tony,

You make a good sounding board so, if you have the patience, allow me to continue the dialog—not contentiously as it may seem, but in the interest of getting at the root of this PS tool.

"…I contend that the 25% saturation of the color is just that. It’s a hue of "X" with a 25% saturation, and 100% lightness…"

But the saturation in the example I gave was 39%. Whence your contention that the hue is 25%?

100% lightness????? No, Tony.

When no change in lightness is called for (Lightness slider set to the default zero), what the Colorize feature tries to do is preserve the pixel’s RGB luminosity while resetting its hue to the hue of the foreground.

The RGB luminosity is the weighted sum of the pixel’s components: 0.3 R + 0.59 G + 0.11 B. Notice that the coefficients add up to 1, so when all three components have the same value, the RGB luminosity is that value. When that value is 255, the luminosity is 255 (white).

Juggling color values to maintain luminosity while being constrained by a fixed hue is all that the Colorize algorithm attempts to do. There is no mysterious blending involved.

George
Y
YrbkMgr
Jul 10, 2003
George,

But the saturation in the example I gave was 39%. Whence your contention that the hue is 25%?

I was using the example of the default 25% saturation slider in the Hue/Sat dialog, when Colorize is checked.

100% lightness????? No, Tony

Sorry, I meant Brightness (HSB).

while being constrained by a fixed hue is all that the Colorize algorithm attempts to do.

No, while constrained to a fixed hue AND saturation. Bear with me here.

As I understood the original question, it was basically, "What is the predictive value of the Saturation Slider in the Hue/Sat dialog box when "colorize" is checked?"

If you forget about the EFFECT that colorize has on the image itself, for just a minute, as far as I can tell that slider drives how much (percentage) saturation will be "mixed" with that particular HUE, which in turn, is then "blended" (for lack of a better term) into the image.

Let’s go back to the color wheel as a visual. There are two directions you can travel on the wheel. You can traverse the circumference, or you can go from the middle of the wheel to the outter edge.

The default hue used by the hue/sat dialog is, of course, set by the foreground color. Sliding that moves you around the circumference of the color wheel.

The saturation slider in that dialog moves you from the center (0%) to the very edge (100%) for that particular hue. As far as I can tell, the color that will be applied to the image is the Hue in that dialog, the Saturation in that dialog, and 100% brightness. The lightness slider is, as you say, a percentage of luminosity.

What I’m hearing you say is "No, that can’t be, because when I measure the result, the Saturation isn’t 25% that I set it at, rather, it’s some other number. Thus, what does saturation represent?"

Fundamentally, the way I am thinking about it, and depsite my candor, I don’t claim that I’m right, it’s just a discussion. But..

I think that you are trying to say "If I set the slider at 25% saturation, shouldn’t my Info box show me 25% saturation?"

If that’s the case, then I say "No, it shouldn’t." Why not? Well…

I think of the Colorize feature as two simultaneous steps: 1. Define color to apply to the image, 2. Apply that color to the image.

It is step number 2 that changes the resulting characteristics of the image. Fundamentally, you take a desaturated (grayscale color range) image, and apply 100% saturation of a particular hue, THEN blend the two together, your result should NOT be 100% saturation of that color – it should be some value less than 100% but greater than 0%.

Kind of like chocolate milk. You are adding two substances together and the result is neither of the first two. Does that mean that if I measure the color of my chocolate milk, that I should be able to determine the concentration of chocolate used? Yes, but it’s not easy, it’s chemistry. You cannot say, though, that if your chocolate milk is brown, then one of the colors that created that milk must have been the same brown – it MUST have been different.

So again, what I’m saying, in as respectful way as possible, is that A) there is a correlation between the saturation slider and the resultant saturation (the effect seen by applying Colorize) but B) the saturation of a particular pixel post effect will NOT be the same as the saturation used to create the effect.

As I said earlier, it becomes this: how do you know that it ISN’T 25% saturation when you set the slider? You can’t measure it with the info box. They should NOT be the same values.

See what I’m driving at?

Peace,
Tony
Y
YrbkMgr
Jul 10, 2003
Saturation is the "pureness" if you will of a particular color. From a spectrophotometric standpoint, it is the wavelength range of a particular hue. That is to say, for a given hue (amplitude of a curve), there is a wavelength range of values that define the saturation (in nanometers). The broader the spread of the wavelength, the less saturated a particular Hue is said to be. So saturation, technically is a range of wavelenghts or the bandwidth of the output for a given light source.

Having said that, and also in an attempt to clear up differences, I would point you to the following:

file://C:\Program%20Files\Adobe\Photoshop%207.0\Help\1_8_13_ 0.html

This is the location on MY system of the specific page in the Photoshop online help, that refers to what I was speaking of in the previous post. It is under the topic of Using the Hue/Saturation command.

It’s interesting that I’m learning more about this as we discuss it, and although we may not see eye-to-eye, I find it quite stimulating, so "thank you".

Additionally, after reading that link above, it convinces me more and more of what I was trying to say – in truth I hadn’t read the help file on this subject till now, and it seems to be saying the same thing I was trying to say, using a color wheel as an example.

But you still haven’t answered my question. What is it that makes you think that setting the Sat slider at 25% ISN’T 25% saturation?

Peace,
Tony
P
Phosphor
Jul 10, 2003
Tony,

OK, now that you’ve defined saturation, try using that definition to tell me quantitatively what a pixel’s saturation is given its R,G,B values?

"…But you still haven’t answered my question. What is it that makes you think that setting the Sat slider at 25% ISN’T 25% saturation?…"

Well, if I use a uniform patch (every pixel in the patch has the same RGB components) and colorize it with the saturation slider value set at X, the resultant saturation of the patch is not X. Let X be 25, if you like, but it can also be any other value.

George
DM
dave milbut
Jul 11, 2003
I wish chris or one of the guys in the "know" would come in and clear this up! I have nothing to add personally except to echo Tony’s sentiments that this is a very interesting thread. Cheers guys!

dave
P
Phosphor
Jul 11, 2003
Tony (and Dave)

"…it’s too complex for me to noodle out…"

Wrong again, Tony. It’s as easy as lifting your index finger.

Bear with me. I swear I’ll get you there.

Next step: Do this one honestly. Don’t seek out the answer before you make a judgment. AFTER making the assessment. THEN go to the color picker, punch in the RGB values and read off the saturation. Here’s the test:

Which of the following pixels is more saturated (RGB values given)?

#1 200/150/100

#2 75/100/50

George
Y
YrbkMgr
Jul 11, 2003
Wrong again, Tony

LMAO! George, you haven’t convinced me that I was wrong the first time! Unless you mean when I mistakenly wrote Lightness instead of Brightness – which, btw, is often exchanged for Brightness when talking about the HSB color model.

So I tried your experiment.

Well, okay, so what? I told you that I couldn’t noodle out the RGB correlation. I looked at the values and would never have been able to tell which is more saturated from RGB values.

However, as you have set up, they are equally saturated.

George, look, I *know* you want to lead me to the discovery. It appears that you are holding a card, a piece of information so that you can experience the joy of my own "ah-ha". And I appreciate that, but you have to now come clean.

Tell me what is wrong with the hypothesis in my post #19 – tell me why measuring the saturation RESULT should equal the saturation of the BLEND color (or in this case, the post "colorized" saturation).

All indications, visual and theoretical seem to support my hypothesis. Yet you haven’t YET answered why A) I’m wrong, or B) why you can measure chocolate milk and beleive that the OBSERVED purity of chocolate milk is equal to the MEASURED purity of the chocolate, based on looking at the finished chocolate milk alone.

You have me on pins and needles… C’mon, give an old man a jolly and tell me! You seem to be smiling whilst you watch me wriggle <shaking finger>.

Peace,
Tony
Y
YrbkMgr
Jul 11, 2003
Did you expect that from eyeballing their color values?

No. I’m a relative virgin at playing with color and in truth, I still don’t get the RGB v. HSB correlation. But I will study it and see what I can do.

What? And ruin my fun!!

Sadist.

Okay, lemme play <droops head>, I’ll be back.
P
Phosphor
Jul 11, 2003
Tony,

Sorry, Tony, in re-reading your last reply (#22), I see you have already thrown in the towel insofar as calculating a pixel’s saturation—given its RGB component values. So here is the skinny:

You ONLY need to know the RATIO of the lowest value (L) to the highest value (H). You don’t need to know anything about the middle value (M). You don’t need to know which of the RGB components is highest or lowest. Saturation (S) is formulated as follows:

S = (1- L/H) x 100 (percentage)

Of course you will want to confirm this for yourself. Do so in the color picker where you can set any RGB values and read the resultant saturation.

How to interpret this formulation? Easy. As I said in reply #4, saturation is an inverse measure of the extent to which a hue has been diluted with gray. Subtract the gray and you’re left with a fully saturated color.

Subtract the gray? Take out ALL of the lowest color and equal amounts of the other two. After all, that’s what gray is—equal amounts of R, G, and B. What remains after the subtraction is just two colors reduced in value. The third (lowest color) is zero—That calculates out to 100% saturation.

Starting with just two colors (the third =0) and then introducing a third color with ever increasing value from zero, is adding more and more gray and you’ll observe the saturation decreasing until the third color equals the middle color. Increasing the third color beyond that point stops changing saturation because the middle color (which you are not changing) now becomes the lowest color.

If you continue to increase the third color until it equals the highest color and then increase beyond that, the third color now becomes the highet color and saturation now increases because (1-L/H) increases as H increases.

You now have a definition of saturation you can use and it’s quantitative at that. I don’t think we can begin to converse intelligently about any of these matters until we understand the parameters we are otherwise so glib about.

I can also formulate hue, but it’s late. Suffice to say that the hue is determined by the ratio of the remaining two colors after subtracting gray.

Tony, sorry to tantalize you when I could have stated the formula right off. However, in working with my local colleagues face-to-face I have found that hitting them with a formula without any preconditioning leaves them numb and unreceptive thereafter.

George
P
Phosphor
Jul 11, 2003
However, in working with my local colleagues face-to-face I have found that hitting them with a formula without any preconditioning leaves them numb and unreceptive thereafter.

Maybe there’s a message you’re missing!
P
Phosphor
Jul 11, 2003
The RGB luminosity is the weighted sum of the pixel’s components: 0.3 R + 0.59 G + 0.11 B. Notice that the coefficients add up to 1, so when all three components have the same value, the RGB luminosity is that value. When that value is 255, the luminosity is 255 (white).

Last time this particular matter (luminosity) was raised it was confirmed that the equation used is actually:

0.2125R+0.7154G+0.0721B which again adds up to 1.

You might try it and see if it resolves your problem.
P
Phosphor
Jul 11, 2003
Ian,

"…Maybe there’s a message you’re missing!…"

OOOHHH! The truth hurts! VBG

Regarding the luminance (excuse me we should be talking about luminosity), the formulation we need is the one used in Adobe PhotoShop. There is no need to speculate about that. It is directly observable.

To confirm that Adobe has used .3r + .59g + .11b do this:

Create an area of uniform color,i.e., all pixels have the same RGB color values. Select that area. Go to Image>Histogram. The data found there will apply only to the selection. The "mean" luminosity will be the actual luminosity of each pixel since they are all the same. Read the mean luminosity and compare it with what you calculate from whatever formula you are testing. You will find the one I cited to agree PRECISELY with the histogram’s mean luminosity. Whether that formula is the "correct" one is another question. Since it is THE formulation used by Adobe in PS, it is the one we have to deal with.

George
P
Phosphor
Jul 11, 2003
Since it is THE formulation used by Adobe in PS, it is the one we have to deal with.

Hmm, did you even bother to try the equation that I suggested?
P
Phosphor
Jul 11, 2003
Ian,

Yes, I checked your weighting factors and they do not produce the mean luminosity you get via Image>Histogram, whereas the .3/.59/.11 coefficients hit it on the button every time. The precision is the convincer. Would you do me a favor and check this out for yourself. Confirmation from Ian Lyons would be an even greater convincer for this forum’s denizens.

George
P
Phosphor
Jul 11, 2003
The precision is the convincer. Would you do me a favor and check this out for yourself.

Nope!

Confirmation from Ian Lyons would be an even greater convincer for this forum’s denizens.

I would lay good odds that the majority of folk participating in the forums don’t give a rats ass what I think!
P
Phosphor
Jul 11, 2003
Ian,

"…I would lay good odds that the majority of folk participating in the forums don’t give a rats ass what I think!…"

Not to stray too far off topic, but what then accounts for the hit rate at your web site?

George
Y
YrbkMgr
Jul 11, 2003
I would lay good odds that the majority of folk participating in the forums don’t give a rats ass what I think!

That’s little more than a cop out. You know better Ian. There are very few pundits and you are among them. When Ian says: "the best way to achieve X, is Y", People weigh it heavily. Any denial of such is either misplaced modesty or barnyard windage.

If your motives for not furthering the topic analytically (which you are supremely qualified to do) are to avoid the subtrifuge, I could certainly understand it. Obviously you don’t have to contribute any more than you’ve already done, but to say that people wouldn’t care what you think, is, well… plain wrong.

Peace,
Tony
P
Phosphor
Jul 11, 2003
Tony,

Back to your HYPOTHESIS that the colorize operation is a blend of the substrate with another color.

What blend color? What blend mode?

If you are suggesting the blend is with a hybrid composited from the hue of the foreground and the colorize slider settings, I can’t get any blend mode to duplicate the result.

One would think that the blend color could be defined via the foreground. But there would then be no opportunity to adjust it from the Hue/Saturation dialog box. It’s conceivable that the designer may have sought to establish that control but, again, what blend mode is invoked? I have to reject any notion of an undocumented blend mode.

George
Y
YrbkMgr
Jul 11, 2003
George,

Hmmm… you’re right, I was wrong. Here’s why I think so:

Take a grayscale image, convert it to RGB, then set your colors to the default.

Open the Hue/Sat Dialog box and check colorize. Take a screenshot of that dialog, paste it into a new document.

The color bar at the bottom is what I’ve been using to gage this thing. Measure that color (the Blend Color) with the color picker.

Doing this, I’ve determined that there is no correlation between HSB saturation and the saturation slider of the Hue/Sat dialog in creating the color used to create a colorize.

Sigh. Back to square one. NOW, though, your question makes sense – what DOES that slider represent?

But you’re good with this math, so maybe this will help lead to the relationship with the slider.

I have to reject any notion of an undocumented blend mode.

I don’t blame you, but then do you also reject any notion of an undocumented feature such as "colorize"? Clearly my guess was a type of blend mode, you reject that (which is cool), but then that begs the question: What doe Colorize do? That’s not documented either, yet we don’t reject that it does something. Get my point?

Peace,
Tony
Y
YrbkMgr
Jul 12, 2003
The saturation slider defines the maximum saturation of the color that you are colorizing with.

HA! Thanks Chris, it’s as I posted in post #3 <little Irish Jig>

Beer and Pizza for everyone!
P
Phosphor
Jul 12, 2003
Chris,

"…In HSL and HSB, the saturation decreases toward black and white, and goes to a maximum with primary and secondary colors (RGB, CMY)…"

Saturation necessarily deceases at the white end because L/H approaches 1 there, so S=(1-L/H)x100 goes to zero.

But saturation does not necessarily decrease toward the black end. It depends on the L/H ratio. You can’t get much blacker than R/G/B 4/3/2, yet such a pixel has a saturation of 50% the same as a 250/200/125 pixel.

That saturation is maximum for the primary and secondary colors is also obvious from S=(1-L/H)x100, because L =0 for those nodes: [RED (255/0/0), GREEN (0/255/0), BLUE (0/0/255), CYAN (0/255/255), Magenta (255/0/255), and Yellow (255/255/0)].

In short, S= (1-L/H)x100 says it all and can be used to judge the validity of any assertions, including those quoted above.

Chris, if the saturation slider sets the maximum saturation, how is it that the Hue/Saturation default slider setting of "25" in colorize mode yields a resultant saturation of 39% when, just for example, the foreground hue is 30 degrees (its other attributes being ignorable) aplied to, say, a mid-gray substrate. Your answer (reply 38)is too terse to be fathomable.

George
Y
YrbkMgr
Jul 12, 2003
I’ve been thinking about my last reply and feel it may have been a bit childish, so I wanted to make sure and say the following.

Regardless, of how this ultimately ends, I have to thank you George for your kind and gentle style. This has been an engaging thread, one I’ve looked forward to furthering over the past couple of days.

I have learned a tremendous amount over the past couple of days. I don’t know that I have a better understanding now, than I did a few days ago, but certainly feel as though I have a better grasp of the subtlties of the "language". This, I suspect, will take some time to sink in until I can make real use of it, but this has been a VERY educational thread.

With that in mind, from the bottom of my heart, thank you George.

Peace,
Tony
P
Phosphor
Jul 12, 2003
Tony,

Thanks for that recap of this thread. It is difficult not to appear adversarial in making a point or counterpoint. Be assured that I appreciated the give and take. We didn’t reach our destination but the journey has been fun.

George
P
Phosphor
Jul 12, 2003
Chris,

Nobbling on the morsel you tossed out, I am beginning to see the light. You didn’t provide much nourishment, but it has staved off starvation.

I see now that the colorize function imposes a variable saturation limit that goes from zero at the black end up to a flat plateau reached at relatively low substrate gray values. The plateau reached is sustained up to mid-gray and then falls off, reaching zero again at the white end.

The plateau saturation value depends on the slider setting but does not literally equal that setting—it’s just a function of the setting. For example, for slider settings of 25, 50, 75, and 100, the corresponding plateau levels are 39,67,86, and 100.

So your statement that the saturation drops off at the black and white ends was clearly meant to describe the curve of maximum saturation vs substrate gray value imposed by the Colorize algorithm, with a different curve for each slider setting. The set of curves for discrete slider settings are envelloped one under the other, with the higher slider settings relating to the higher amplitudes.

That’s a start. Ya got any more morsels?

George
Y
YrbkMgr
Jul 12, 2003
George,

I can’t stand it. Do this:

Create an image and fill it with 128/128/128 RGB gray. Create an adjustment layer of Solid Color and use 255/0/0 RGB red. Set the blend mode of the adjustment layer to Soft Light.

Create a new layer and Stamp the visible layers (Alt-Layers|Merge Visible).

Use the info box and measure the HSB values of the stamped layer.

Are they the same, any of them, as the Red you used in the adjustment layer?

Should they be?
P
Phosphor
Jul 12, 2003
Hi Tony,

Yes and Yes.

For a top layer in Soft Light blend mode with top layer opacity = 100% and RGB color channel value 255, the resultant color value in that channel will be the (square root of (v/256))x255, where v = channel color value in the underlying layer.

For the red channel in your example, the resultant is the (sq root of (128/256)) x 255 = .707 x 255 = 181.

For the green and blue channels, the top layer value is zero, In that case the resultant is not the square root but, instead, the square. For your example, the resultant is ((128/255)^2)x 255 = .25 x 255 = 64.

Merging the layers doesn’t change the result.

George
P
Phosphor
Jul 12, 2003
Hi Tony,

Yes and Yes.

For a top layer in Soft Light blend mode with top layer opacity = 100% and RGB color channel value 255, the resultant color value in that channel will be the (square root of (v/256))x255, where v = channel color value in the underlying layer.

For the red channel in your example, the resultant is the (sq root of (128/256)) x 255 = .707 x 255 = 181.

For the green and blue channels, the top layer value is zero. In that case the resultant is not the square root but, instead, the square. For your example, the resultant is ((128/255)^2)x 255 = .25 x 255 = 64.

Merging the layers doesn’t change the result.

George
Y
YrbkMgr
Jul 12, 2003
Merging the layers doesn’t change the result

Yes it does, you are measuring the Adjustment layer. Different results when *I* do it…

Try it.
P
Phosphor
Jul 12, 2003
Tony,

HSB of red layer: 0/100/100 [RGB 255/0/0]

HSB of stamped layer: 0/65/71 [RGB 181/64/64]

Only the hues are the same (0 degrees = red). No surprises. All values are expected values.

George
Y
YrbkMgr
Jul 12, 2003
That’s exactly why you don’t get the same saturation percentage when you measure an image with Colorize. Once blended, values change.
P
Phosphor
Jul 12, 2003
Tony,

Just like the tango, blending takes two. We know the foreground is NOT one of them. (Surely by now you must be convinced of this, but I’ll recap why upon request). So you have the substrate and…NOTHING else for it to blend with.

George
Y
YrbkMgr
Jul 13, 2003
We know the foreground is NOT one of them

True – well, the foreground Hue is for sure, but that’s beside the point. But that doesn’t mean that a color is not being blended at all.

NOTHING else for it to blend

Disagree – then explain how you can sepia tone a grayscale image at all. Gray + Blend Color + Blend Mode = result.

So my point is, in your investigation, just like the procedure I outlined with the Soft Light Blend mode followed by stamping the layer and measuring that, your RESULT, in colorize cannot (easily) be used as a tool to determine the blending color (HSB, RGB, or otherwise0.

So here’s what *I* get out of this: Chris Cox says that the Saturation Slider in the Hue/Sat dialog box, when colorize is checked, represents the Maximum saturation of that particular Hue. That answers that question.

Next, as you go through investigating the relationship between that slider and the actual color used to do the "blend", in the colorize algorithm (which is a worthy endeavor, to be sure), you have to be very careful what tools you are using to draw your conclusions.

Just as we saw that the stamped result of a Soft Light blend is different than the color used to create that result, so is the result of a Colorized image.

Now, if you play long enough, you may be able to come up with a correlation, but to expect that the saturation (or even the HUE) will be the same in the result as it was for the blend color is, well, IMO, inaccurate. True that there is a correlation but it’s not one-to-one so to speak.

Peace,
Tony
P
Phosphor
Jul 13, 2003
Tony,

Just like the tango, blending takes two. We know the foreground is NOT one of them. (Surely by now you must be convinced of this, but I’ll recap why upon request). So you have the substrate and…NOTHING else for it to blend with.

George
Y
YrbkMgr
Jul 13, 2003
Must be an echo.
Y
YrbkMgr
Jul 13, 2003
Oh my God, you are clairvoyant!!

I knew you were going to say that <grin>.

we are not dealing with a BLEND.

By YOUR definition of a blend. That notwithstanding George, the principle remains the same.

Hell, I don’t know another way to say it. Just LOOK at what happens when you colorize. Do you see solid colors? No, you see some kind of blend between the gray values and the color used. Whether it’s a "technical" blend or not is irrelevant, and my point remains the same.

You CANNOT expect the finished image to have the same RGB/HSB values as the color you used in colorizing, just as you cannot do it when applying a layer style then stamping the layer.

To me, it’s straightforward. <shrug>

Think chocolate milk George, chocolate milk (with bourbon). What happens when you mix chocolate and milk? Same thing.
P
Phosphor
Jul 13, 2003
"…You CANNOT expect the finished image to have the same RGB/HSB values as the color you used in colorizing…"

I’ll buy that. And you knew I would, didn’t you.

George
Y
YrbkMgr
Jul 13, 2003
George,

Are you a troll? Are you toying with me? (uh, do you drink? – kidding).

If you buy that, then Post #10:

With the Info palette in sight, move the cursor inside the square. Read Hue = 30 deg, Saturation =39%, Brightness = 63%.

How do I relate the 39% resultant saturation to the Colorize Saturation slider reading of 25. The 25 is clearly not the resultant saturation. If the 25 represents a percentage change in saturation, the change is from what base?

Post #18:

Well, if I use a uniform patch (every pixel in the patch has the same RGB components) and colorize it with the saturation slider value set at X, the resultant saturation of the patch is not X. Let X be 25, if you like, but it can also be any other value.

Then read Post #44 and #46.

Up until the last post, you have maintained that you should be able to look at the "composite" of the blending/colorized image and that the colors should be the same HSB/RGB values as the colors used to create the effect. Now you agree with me?

George, either we’re on way different plantets, or you are contradicting yourself.

Whichever the case, I’ve learned more about how colors come together in the past 24 hours than I have in the past three years, thanks to you.

Peace,
Tony
P
Phosphor
Jul 13, 2003
Tony,

I hate to repeat myself, so here’s a NEW view:

The resultant color can be described by the 3 RGB values. When colorize is invoked, there are 3 constraining equations involving these variables. As you know from 9th-grade algebra, if the number of non-degenerate equations equals the number of variables, you can solve for each of the variables.

Letting H,M,L represent the high, middle, and low RGB color values of the resultant pixel, the colorize constraints on R, G, and B derive from:

(1) Hue (fixed by the foreground hue) constrains (H-L)/(M-L).

(2) Saturation (fixed by the gray level of the image and by the saturation slider position) constrains L/H.

(3) Luminosity (fixed by the luminosity of the image which colorize attempts to preserve) constrains aH + bM + cL, where a, b, and c are the previously-discussed luminosity weighting factors used by Photoshop.

The resultant RGB values are thus fully specified when you fix the foreground hue, the image gray level, and the saturation slider position (provided, of course, that you accept the other default slider positions without change—and by all means let’s do so just to keep things simple).

Thus, there is no blending of two colors.

As for your chocolate mixing analogy, try this one: Take a half-pint of chocolate milk, pour half into one glass and half into another glass. Now pour the contents from one glass into the other. You’ve blended them and gotten the same shade of chocolate, right? Not so with most PS blends. Blend a color with itself in Multiply, Screen, Soft Light, Hard Light, Overlay, etc etc and you’ve got youself an entirely different shade. So, when you advise "…you have to be very careful what tools you are using to draw your conclusions…" I’d have to counter with being very careful with your analogies.

George
P
Phosphor
Jul 13, 2003
Tony?…Tony?…It’s been more than an hour since I’ve heard from you…You must have gone to church…

I hope while your mind wanders as you sit through the Sunday sermon, you will do some serious thinking about all this. There is no better environment in which to SEE THE LIGHT!

On the way home, stop at the soda fountain and "blend" chocolate with chocolate to see if you can get vanilla—or at least French vanilla—as you can in PhotoShop.

George
Y
YrbkMgr
Jul 13, 2003
Ahh, I see what you’re saying now.

In simple terms (those suited to my acumen) you’ve got gray, you add red, should be red – well sort of.

But as you’ve witnessed yourself, the observable data does not support that. Specifically, when you colorize an image, you do NOT see the same shade of the color used when you measure it with the Info pallet.

So while mathematically, there is no blending, certainly something is happening.

I still contend that my analogy of chocolate milk is sound, based on observable effects. YOUR analogy of taking two of the same things and pouring them together is not what is happening at all George.

Your analogy proposes (incorrectly) that the image and the color used in Colorize are the same colors – they aren’t.

Thus, there is no blending of two colors.

In simple terms there is blending. You’re mixing a grayscale image with a red. The result will not be red, as we have witnessed experimentally right?

You’re trying to make the model fit the data, but the data suggests a different model.

You must have gone to church…

You’ll never catch me in one of those places. I have been working 18 hour days all week, after dinner I passed out. Now I’m behind (yikes!)

Peace,
Tony
P
Phosphor
Jul 13, 2003
Tony,

"…YOUR analogy of taking two of the same things and pouring them together is not what is happening at all George…"

The blending of identical colors in PS to get a different color—so contrary to expectations—demonstrates how inadequate our intuition is and how far astray we can be led by literally interpreting the usual meaning of words—in this case the word "blend". In no way was I referring to what is happening during the colorizing operation.

Tony, I am delighted that you say you have learned a great deal in the short time we have been kicking this issue around. For my part, you have goaded me into digging deeper than I otherwise would have and, thereby, I too have learned a lot. It’s been a healthy interchange for which I do thank you.

George
Y
YrbkMgr
Jul 13, 2003
It’s been delightful George.
P
Phosphor
Jul 14, 2003
Tony,

This thread is now so far down the list, I don’t know if you or anyone else will ever return to it. But I thought you would be interested to know that I have resolved the matter and have identified what the saturation slider represents when colorizing. This is not easy to explain, so little wonder no-one has attempted to do so—not even the experts.

George
Y
YrbkMgr
Jul 14, 2003
So… it isn’t what Chris Cox had said?
P
Phosphor
Jul 15, 2003
What I said was right.

I just didn’t give you ALL of the math involved.
Y
YrbkMgr
Jul 15, 2003
George,

Here’s the story as far as I can tell. I can understand about half of what you say when you use mathematical models. Although I held a double major in college in math and inorganic chemistry, I was never involved with color until about three years ago and learned it by the seat of my pants.

So my point is, I have difficulty relating in your terms – which I think is where we may have a fundamental problem. Suffice to say though, I respect your investigative nature and since it appears that both you and Chris agree, I’m satisfied.

Don’t get me wrong, it still remains somewhat of a mystery to me, but in my usual style, I will be thinking about it every time that dialog opens. I am hoping that I will make the connection. Not because it matters so much functionally, but because this is my absolute first endeavor to understand what is happening from a mathematical/spectophotometric perspecitve.

It’s be real, and it’s been fun, but it hasn’t been real fun – I’m kidding.

I’ve saved the thread so that I can refer to it if I ever have what is sometimes called "a moment of clarity".

Peace friend,
Tony
P
Phosphor
Jul 15, 2003
Revision to my post #65

Whereever I used (H-L)/T, delete it and substitute (H-T)/T.

Where I said "…the spreading is stopped when H-L is 25% of T…" should read H-T is 25% of T.

The statements apply for T < 129.

For T>128 there is a decline which I have not formulated yet.

Chris, I am guessing that you have proprietary or patent or company policy constraints that keep you from revealing HOW PS features work (some features, at least)and are more or less confined to advise users WHAT to do. If that is correct, my apologies for pressing you on matters you are not free to discuss.

George
P
Phosphor
Jul 15, 2003
Tony,

EUREKA. I have agreement with Chris’s advisory (post #38) that:

"…The saturation slider defines the maximum saturation of the color that you are colorizing with…"

[FORENOTE: Be aware that the colorize tool operates this way: When "spreading" the high and low color values from the initial gray value, the low value is decreased by the same amount as the high value is increased. That is, the low value decrement equals the high value increment. The middle color value will also change, in order to hold hue constant. The middle value stays fixed only for certain discreet hues, the popular 30 degrees (sepia) being one of them.]

Let P = the "saturation" slider POSITION

Let T = the initial gray TONE

Let H = the HIGHEST of the R,G,B values

Let L = the LOWEST of the R,G,B values

For 48 < T <129

(H-T)/T =P

H-T = T-L

By manipulation it follows that:

H = T (1+P)

L = T (1-P)

Using my formula for SAT, S = (1-L/H)100

S’ = S/100 = 1-L/H

S’ = 2P/(1-P)

When P = .25 (the default slider position)

S’ = .5/1.25 = .40

Compare with observed value of .39 for P=.25 , 48<T<129 (and observed S’values for any other value of P).

The .40 value for P= .25 is the maximum value of the saturation and we can now see what Chris means by "maximum". As you vary the initial gray tone, the colorized result will have its maximum value for all grays between 48 (approx) and 128 (exactly). Below 48 and above 128 the saturation declines (non-linearly). Between 48 and 128, the saturation remains flat at its "maximum" value for the slider setting chosen.

So Chris’s statement was correct. It just needed one hell of a lot of interpretation. All’s well that ends well.

Tony, I do hope this dispels the notion you have clung to so doggedly that there is a blending action here. There is NO blend because there are no two colors to blend. What is really happening is that you are plain and simply specifying what the color is going to be. You are doing so by inputting the hue desired and adjusting the "maximum" saturation via the saturation slider, bearing in mind that the saturation slider reading is NOT literally the maximum saturation. By setting the maximum saturation (the plateau between gray 48 and gray 128) you are adopting the Colorize tool’s curve for saturation vs gray value for the full range of grays from 0 to 255.

I think I have previously said this is not easy to explain.

George
P
Phosphor
Jul 15, 2003
Correction to Post #69

Typo

Change S’ =2P/(1-P) to S’ = 2P/(1+P)

My wife doesn’t call me "mole-eyes" for nuthin’

George
Y
YrbkMgr
Jul 15, 2003
George,

you are adopting the Colorize tool’s curve for saturation vs gray value for the full range of grays from 0 to 255.

Ah, now I understand. Technically not a blend, I always knew that; rather I don’t have the language to describe the result so I used ‘blend’ generically, which I understand is incorrect.

Fwiw, the only thing I really hung on to, was the notion that the value of the Saturation in the Hue/Sat dialog box would NOT match the resulting image. Thus using the Info box to say what was really happening should have been viewed as an indirect indicator instead of a direct indicator; this is essentially what you’ve explained with the line that I pasted into this post at the beginning.

Most excellent work though George – you have my supreme respect for peeling the layers of the onion apart.

Peace,
Tony
P
Phosphor
Jul 16, 2003
Yes, there are restrictions on how much we can say about how features work.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections