Please help me to understand "Channel Mixer"

I am very confused what is the purpose to adjust other colors in certain color channel.

I understand basically there is a color wheel, what color is opposite of what color, however the other colors (e.g green/blue in red channel) don’t seem to follow the rule at all.

The Rawpedia has some very limited information, I am looking for some better tutorial, and ideally some real world examples - how to achieve some effect by adjusting what.

Thanks

3 Likes

I’m on mobile right now, so will answer in greater detail later, but a good introduction to the what’s going on might be found here:

I’ll be back in a bit.

1 Like

Great!, I will be waiting for your further explanation.

Ok, I’m assuming you’ve read the link I posted earlier.

The channel mixer is most commonly found in tutorials around the idea of two main approaches:

  1. (Awesome|Amazing|Incredible|<insert-hyperbole-headline-here>) B&W creation using Channel Mixer!
  2. Color/White balance adjustments.

Now, to be fair, the Channel Mixer does offer a lot of control when creating B&W images, but it also happens that it may be the easiest way to understand what’s actually happening.

That is, basically, two things.

  1. A single color channel (R, G, or B) can be viewed as a grayscale image, where the lighter the image, the lighter the corresponding color will be.
  2. You can include values from another channel to modify your current channel values.

It’s a common enough adjustment method that it shows up in many different editing programs. Here is the same control in GIMP, RawTherapee, and darktable:



So, let’s look at an image. Here’s the lovely Sarah Carag from a couple of years ago:

If you set the Green and Blue channel respective green/blue sliders to zero (0), you’ll see just the red channel representation of your image:


It’s probably easiest to focus on a single channel for the moment, but this applies to all of the channels in the mixer.

These are the values of red in your entire image. If you were to now adjust the green slider in the Red channel, you would see that you weren’t really introducing any green color into the image, but would actually be increasing the total amount of red. For example, I’m going to raise the green slider to 50 in the Red channel:


This now adds the Green channel values to the Red channel (50), increasing the total red channel values.
You can see how the red channel blows out now on her cheek and forehead (the values have reached their upper limit and are clipping).

To see what this does to your normal image, set the Green and Blue channel sliders back to their default (Green channel, green slider = 100, Blue channel, blue slider = 100):



Here’s the original image again for comparison:

Notice that you haven’t introduced any green colors into the image by adding it in the mixer, but rather have adjusted the Red channel values instead.

Make a note, this is important:
Adjusting color sliders in a channel for other colors won’t change the color of the channel, just adjust that channels intensity. (in the Channel Mixer).

It’s simply another way to adjust the color intensity/value on a channel-by-channel basis, using other channels as a modifer. (You can also subtract from your channel by using negative numbers).

I don’t normally use the mixer for much outside of B&W conversion in my normal workflows, but one thing you can try when looking at images of people is to make minor adjustments to favor the red channel values overall, as it’s generally pretty on skin tones.

Try something subtle like bumping the Red channel reds a bit, dropping the Red channel blue/green to counter, and bumping red slider in the other channels, while dropping the corresponding sliders:



Here’s the original image again for comparison (again):

I would experiment, keeping in mind that modifications in a channel will ultimately only alter the values of the channel color (how they mix is a different story… and in fact is one of the ways to adjust WB for the image by pushing/pulling each channel to achieve a desired balance).

20 Likes

@patdavid, a very awesome explanation!

1 Like

@patdavid, very good explanation.

Though, I am still not clear if I simply need to adjust the colors (not working on B&W), why I need to modify other colors in a certain channel instead that I simply just adjust RGB. As you have pointed out already:

There are many bundled processing profiles in RawTherapee, I checked some of them the way they manipulate color is to play with all the colors in all channels. For example the “faded golden 1” will set:

  • red channel: r=60, g=0, b=20
  • green channel: r=0, g=60, b=20
  • blue channel: r=-20, g=20, b=40

So in this case why not simply adjust RGB:

  • r=80
  • g=80
  • b=40

I tried, it will look same as the more complicated setting.

Because these are not the same thing. The channels are not all identical (if they were you’d see a grayscale image only). So including some portion of another color channel will create a different result.

r=60, g=0, b=20 does not equal r=80 in the red channel.

Using the Sarah image as an example again, here I will apply the first channel mixer setting you mentioned:

  • red channel: r=60, g=0, b=20
  • green channel: r=0, g=60, b=20
  • blue channel: r=-20, g=20, b=40

Now, I will apply the second version as you mentioned:

  • r=80
  • g=80
  • b=40

These aren’t the same thing. Notice the slightly more red tones on her skin highlights vs. the yellow-ish cast it has in the first one. I brought both images into GIMP and did a normalized difference of the two:

If they were the same thing, this image would be black. :slightly_smiling:

The thing to realize is that all of the channels will have different levels/tones. The channel mixer allows you to include tones from other channels to influence your current channel color value.

It’s also a paint to wrap your head around without experimenting a bunch. Another thing you could try is to slightly bump each channels corresponding color slider up a tiny bit to add some punch/vibrance to your colors overall (red channel, red slider=110, green channel, green slider=110, etc…).

2 Likes

I hear you, the different colors in certain channel provide different density. For example in red channel 1% green may produce 1.5% red (a hypothetical value).

BUT, do you think I am still be able to just manipulate RGB to produce exactly the same color? If so I still don’t get the point why I need to change other color value in the channel.

That doesn’t make sense to me, probably because it’s wrong, but I can’t be sure it’s wrong as it doesn’t make sense to me :wink:

Use this photo to test channel mixer settings on:
http://rawtherapee.com/shared/test_images/colortarget/Pentax%20K-5%20daylight.dng

Use the colorwheel:

  1. Apply the (Neutral) profile, zoom right into the blue patch.


    What do you expect will happen if we tell RawTherapee to “add some of the values from the blue channel into the red channel”? Looking at the color wheel, I expect the blue color to shift in the direction of red, so I expect blue to change to purple.

  2. Using the channel mixer set the blue component of the red color (blue dot in red circle) to 50.
    What happened?


    Blue changed to purple as expected. But simply increasing the brightness of the red channel (because we added some of the values from the blue channel into the red channel) means that all colors will shift to red. Did that happen?

    Yes, the whole image has a reddish color cast. Look at the bottom row of what used to be grey patches - they be pink.

  3. To remove the color cast, you must subtract from the red component of the red channel the same amount you added to the other components in the red channel.
    We set R(B)=+50, so we must subtract 50 from R(R).


    Et voila, neutral colors restored, and blue is still shifted towards red, making it purple.

Ditto for the rest.

6 Likes

You will not be able to replicate the effect of adding another channel value to the Red channel (for example) by simply modifying only the Red channel Reds. That is, adjusting the blue slider in the Red channel will produce an effect that you cannot get by only modifying the red slider in that channel.

The effect from this modification could technically be reproduced using color curves, but I certainly wouldn’t want to do it. :wink:

Mr. Fancy-pants,

I’m new here and relatively new to the concept of color channels and using them to adjust overall color in an image. I’m afraid that I just don’t get this. I’ve read the article from earlier in this thread and I’ve Googled and read several other articles that attempt to explain color channels but none of them make any sense to me. The article referenced above immediately clicks the monochrome check box once it gets to the channel mixer so it neglects to answer my questions.

I get that there are different color models and color spaces and that an image can be broken down into red, green, and blue elements. What I don’t get is how the “red channel” can have a green and blue element or value or level. Every explanation I’ve found about color channels starts by explaining color models and then goes on to break down an image into three colors. When they explain RGB they show that pixels are made up of three colors and changing the intensity of any one of those three colors in a pixel results in a different shade. I get that. It makes sense. But then when they talk about color channels they all explain it as if the red color channel is only the red value of each pixel. So if there is no red in a certain pixel than the red channel would be black. If the red channel is only the red value in a pixel, then how can you adjust the green or blue in the red value? And, why would adjusting the blue value of the red channel cause blues to turn purple. I realize that it does work, I just don’t get why and nobody seems to be able to explain it. All that anyone can do is use examples to show that, for example, blue turns to purple when you increase the blue in the red channel. I guess if I experimented with this long enough I could just train myself to know what effect changing these levels will have, but that still won’t help me to understand why they have the effect they do.

What is a channel? Clearly it’s not what I think it is. There is some major abstraction taking place here and none of what I’ve read seems to explain it. I apologize if I’m being really hard headed about this but I really want to understand it. I think what would be helpful would be for it to be explained on a pixel by pixel basis. For example, if I have a pixel with an RGB value of R50-G200-B10 and I change the blue level of the red channel, what will I end up with? It’s been pointed out that just adjusting RGB levels can’t achieve the same results as using the channel mixer but after you’ve made adjustments using the channel mixer, your pixels will still have an RGB value and I assume it will be different in some way from the original. I imagine that the algorithms used to make those adjustments are very complex but in the end, isn’t that all that is really happening? Are the channel mixer adjustments not just changing the RGB values in individual pixels?

I guess it’s really just the abstraction that’s confusing me. How can adding blue to the red channel make blue colors look more red? That’s counter-intuitive.

4 Likes

Based on @patdavid’s explanation above, if I understand correctly:

Increasing the red slider in the red channel:
boosts the red channel (making the resultant image more red) based on the tonal information in the red channel itself.

Increasing the green slider in the red channel:
boosts the red channel (making the resultant image more red) based on the tonal information in the green channel.

I’ve not done the second type of operation myself, but I imagine it’s often a subtly different way of controlling colour. The more the green/other channel differs from the red/adjusting channel, the more different it will be.

It’s not blue that’s added to the red channel, but a portion of the blue channel’s tonal data/numbers. (The portion/amount added is controlled by the slider.) And so the red channel is increased as compared to the blue (and green) channel.

2 Likes

@tstoddard - don’t get too caught up in the idea of color models/spaces just yet. It can be counter-intuitive to wrap your head around but at the end of the day the biggest things to keep in mind is

adjusting each channel in the mixer (red, green, or blue) will only adjust how “bright” that particular color is.

You won’t be adding any other colors into the mix. The channel mixer only let’s you adjust how intense that particular color is.

Hopefully I can clear this up. Let’s consider four “pixels” that are only made up of a Red and Green channel (we’re ignoring Blue for the moment to simplify things) that go from 0 – 255.


From left to right, we are going to set their initial Red, Green values as:

First: 127, 0
Second: 127, 64
Third: 127, 127
Fourth: 0, 127

So, let’s look at modifying only the Red channel in the channel mixer. I’m going to use GIMP for this example but the theory should be the same everywhere.

So on the Red channel, let’s push the Green contribution up to “50”.

What I would expect from this is to take the Green channel value for each pixel, multiply by 50%, and then add it to the Red channel.

First Pixel

So let’s look at the First “pixel”.

It’s values are R = 127 and G = 0. So…

  1. Multiply Green channel value by 50%:
    0 × 0.50 = 0
  2. Add the result to the Red channel value:
    127 + 0 = 127

The final result of this operation on the pixel will be nothing:
R, G = 127, 0

Second Pixel

The second pixel has something interesting finally happening to it.
Remeber, it’s values are R = 127 and G = 64.

  1. Multiply Green channel value by 50%:
    64 × 0.50 = 32
  2. Add the result to the Red channel:
    127 + 32 = 159

The final result of this operation on the Second pixel will be:
R, G = 159, 64

Third Pixel

The third pixel has it’s values as R = 127 and G = 127.

  1. Multiply Green channel value by 50%:
    127 × 0.50 = 64
  2. Add the result to the Red channel:
    127 + 64 = 191

The final result on the Third pixel is:
R, G = 191, 127

Fourth Pixel

The fourth pixel has no Red in it: R = 0 and G = 127.

  1. Multiply the Green channel value by 50%:
    127 × 0.50 = 64
  2. Add the result to the Red channel:
    0 + 64 = 64

The final result on the Fourth pixel is:
R, G = 64, 127

If we actually do this in GIMP, we see that this is exactly what we get (notice that the Green channel hasn’t changed at all in this only the Red channel).



Top, after channel mixer +50% R(G), bottom original.

If we go further and instead adjust the Red channels Green contribution, R(G), up to 100%:

First (R, G): 127, 0 ⟹ ( 127 + (0 × 1.00) ), 0 ⟹ 127, 0

Second: 127, 64 ⟹ ( 127 + (64 × 1.00) ), 64 ⟹ 191, 64

Third: 127, 127 ⟹ ( 127 + (127 × 1.00) ), 127 ⟹ 254, 127

Fourth: 0, 127 ⟹ ( 0 + (127 × 1.00) ), 127 ⟹ 127, 127

Which is what we see when doing the operation in GIMP:



Again, in all cases, notice that the Green value doesn’t change - we are only modifying the values of the Red channel.

Hopefully this makes sense?

8 Likes

Any slider in the Red channel can only affect the R value of your output pixel. Likewise, any slider in the Green channel can only affect the G value of the output pixel, and any slider in the Blue channel can only affect the B value of the output pixel.

Your input values are R50 G200 B10

Normally
the Red channel sliders are R100 G0 B0 this means 100% of 50 + 0% of 200 + 0% of 10. Output R=50
the Green channel sliders are R0 G100 B0 this means 0% of 50 + 100% of 200 + 0% of 10. Output G=200
the Blue channel sliders are R0 G0 B100 this means 0% of 50 + 0% of 200 + 100% of 10. Output B=10
so your output pixel = R50 G200 B10 = input values = unchanged

Lets change the red channel sliders only, remember this can only affect the R value of the output pixel.
Red channels sliders are now R0 G0 B100 this means 0% of 50 + 0% of 200 + 100% of 10. Output R=10
Green channel sliders are R0 G100 B0 this means 0% of 50 + 100% of 200 + 0% of 10. Output G=200
Blue channel sliders are R0 G0 B100 this means 0% of 50 + 0% of 200 + 100% of 10. Output B=10
so your output pixel = R10 G200 B10

Lets change the R channel some more.
Red channels sliders are now R0 G50 B100 this means 0% of 50 + 50% of 200 + 100% of 10. Output R=110
Green channel sliders are R0 G100 B0 this means 0% of 50 + 100% of 200 + 0% of 10. Output G=200
Blue channel sliders are R0 G0 B100 this means 0% of 50 + 0% of 200 + 100% of 10. Output B=10
so your output pixel = R110 G200 B10

Why would adjusting the Blue slider of the Red channel make blues purple?

Input R0 G0 B255 = pure blue

Red channel sliders R100 G0 B100 which means 100% of 0 + 0% of 0 + 100% of 255. Output R=255
Green channel sliders R0 G100 B0 which means 0% of 0 + 100% of 0 + 0% of 255. Output G=0
Blue channel sliders R0 G0 B100 which means 0% of 0 + 0% of 0 + 100% of 255. Output B=255
Output pixel = R255 G0 B255 = pure magenta

HTH

James

Edit: And Pat beat me to it, with pictures and everything :slight_smile: and this was my first real post too.

3 Likes

Hi James:

This is the most clear answer for the topic I am searching for. Especially

Your input values are R50 G200 B10

But again, back to one of my previous question in the same thread

There are many bundled processing profiles in RawTherapee, I checked some of them the way they manipulate color is to play with all the colors in all channels. For example the “faded golden 1” will set:

  • red channel: r=60, g=0, b=20
  • green channel: r=0, g=60, b=20
  • blue channel: r=-20, g=20, b=40

Based on your formula, I should get

  • Red: 0.6050 + 0200 + 0.20*10 = 32
  • Green: 050 + 0.60200 + 0.20*10 = 122
  • Blue: -0.2050 + 0.20200 + 0.40*10 = 34

So if I set the slides to:

  • Red: R64, G0, B0
  • Green: R0, G61, B0
  • Blue: R0, G17, B0

It should produce same color?

@patdavid and @james, thanks for the great answers to my questions. It’s starting to make a lot more sense to me now. I’ve been reading various tutorials and articles about the channel mixer and this is the first explanation that I’ve found that clearly explains what is happening.

Thanks again!

1 Like
  1. Why are you scaling your slider results? If you wanted the same result as “faded golden 1” you can set the sliders to R32, G122, B34.
  2. This is the most important thing: this will make the example pixel value like “faded golden 1” only for this one pixel (R50 G200 B10).

Pretend the very next pixel has a value of R100 G150 B10. Applying your “faded golden 1” channel mixer values to it yields:

Red: 0.60100 + 0150 + 0.2010 = 62
Green: 0
100 + 0.60150 + 0.2010 = 92
Blue: -0.20100 + 0.20150 + 0.40*10 = 14

Which is not the same thing as setting the sliders directly to R32 G122 B34…

You will not be able to replicate the color across your entire image to match the “faded golden 1” preset by only modifying the associated color slider with the channel (reds on red, greens on green, blues on blue).

Hi Hardywang,

I have used a simple mathematical model to demonstrate the concept.

For Rawtherapee it appears the maths is different**. There may be some non-linear scaling or normalization taking place, I don’t know, but please don’t let this confuse you, the concept described in mine and Pat’s previous posts is still valid. They correctly demonstrate the behaviour of the sliders for the channels, it is just that the actual output values are slightly different.

So yes, with my simplistic model and a single input colour of R50 G200 B10, your slider values would produce the same output colour as “faded golden 1”, however for other input colours they would not produce matching output colours.

** I generated an 8bit tiff with paint.net filled with the input values R50 G200 B10. I then loaded this tif into Rawtherapee. Unmodified, Rawtherapee’s RGB percentages are near enough correct. (I don’t know why RT uses % for RGB values). Applying the slider values of “Faded Golden 1”, saving as an 8bit tiff and loading into paint.net shows unexpected output values of R42 G161 B64.

James

1 Like

The RGB values you see in the Navigator panel depend on the working colorspace. If you set it to sRGB the numbers will look as expected. The default space is ProPhoto though and using it the numbers are different.

RT uses for RGB values because makes sense when working in 32-bit floating point precision. 0-255 only makes sense for 8-bit integer precision.

1 Like

@hardywang First of all thanks for starting this topic! RGB Channels is one of my favourite tools in RT (mostly because it enables me to do some Jose Villa shooting Fujifilm 400H film magic to images by making greens bluer and by making skin tones goldener by taking blue out of red)

The image is not mine btw :stuck_out_tongue: it’s from one of Jose Villa’s Workshops as per link above.

Anyway…

I find this thread useful, because it helps me wrap my mind around what RGB Channels actually does. Most articles online seemed helpful but not altogether fully enlightening, so I mostly play it by ear and make things work to look okay without knowing 100% for sure what I’m doing (shh don’t tell my clients).

The way I see it: (Please forgive my ignorance good people, where ignorance may be, and yes, critique and corrections are welcome)

RGB Channels is a tool that lets you define how much of each initial colour is placed in each channel. As an example, the RED channel would be as such:

Red Channel: (what I called initial colour -or all the red that’s available)
Red: 100% – (here I distribute 100% of it)
Green: 0% – (here I distribute 0% of it)
Blue: 0% – (here I distribute 0% of it)

This would mean, since we talk about the red channel, we discuss how much red we put in each channel. So according to the above, we put all of the red channel (all the red colour there is to be worked with) into the final red output, while none of the red is added to the final blue output or green.

It took me a while to figure this out, so that’s why I am over-stressing it. There are two reds; one is the altogether redness that is in the beginning, and then there is the final red amount for pixels. This sounds confusing even to me, so let me use a different example; My turning the greens bluer for filmy effect. Here’s what I do:

Red Channel:
R: 100
G: 0
B: 0

Green Channel:
R: 0
G: 100
B: 0

Blue Channel:
R: 0
G: +40
B: 100

So the way I think of it when I do this is the following; I go to the channel that I wanna do stuff with, in this case it being blue; and then I do stuff with it, in this case add some into green, in this case adding +40 in the green section of Blue Channel.

Considering the previous comment by @Morgan_Hardwood about how making changes to colour channels, I guess I would have to cancel out the channel imbalance by also making the B: 60 (because 100-40=60).

This seemed a bit counter intuitive to me at first: I used to think; "If I wanna add blue to the green tones, well I’ll go to the Green Channel and make it had more blue in it, such as

Green Channel:
R: 0
G: 100
B: +40

but this turned out would add green channel to blue output.

So if I got this somewhat right, the rule of thumb is this:
When dealing with RGB Colour Channels in RawTherapee; when you look at one of them, say Red Channel, you think that this is the colour you are about to work with; and when you edit the R, G, B values within it, you think of those as where you add said channel to.

P.S.:
I’d still love to have sliders that allow you to modify the hue of basic Red, Green, and Blue to other hues, Photoshop/Lightroom style :stuck_out_tongue: But that’s another topic…

9 Likes