Panel
- Bart Busschots (host) – @bbusschots – Flickr
In this solo show Bart tries to explain the difference between a channel mixer for monochrome conversion, and the very similar looking selective colour adjustment, and to do so, he starts by describing the HSL representation of colour our photo editors use internally.
While this podcast is free for you to enjoy, it’s not free for Bart to create. Please consider supporting the show by becoming a patron on Patreon.
Reminder – you can submit questions for future Q & A shows at http://lets-talk.ie/photoq
In LTP 131 I shared my recent adventures in monochrome photography, and one of the things I mentioned was the power of the Channel Mixer for making more creative conversions. This led to an interesting discussion with friend of the show and frequent guest Allison Sheridan about the difference between two almost identical looking controls but don't do the same thing at all, the channel mixer for monochrome conversions, and selective colour adjustments. The app Allison was trying to use had a set of sliders that looked like what I described in LTP 131, but they just didn't seem to be doing anything like what I described they would, what was going on? Allison was using the Photos app on a Mac, and it doesn't have a channel mixer, but it does have selective colour adjustments, and those controls look like a channel mixer.
Initially I struggled to explain the difference, and I didn't do very well, and then I confused things even more by trying to explain that you can actually emulate a less effective channel mixer with a selective colour adjustment, but that did the opposite of help! We switched focus to finding Allison a true channel mixer she could use without spending money on software that wasn't free or that she didn't already own, and got her up and running with Affinity Photo 2.
OK, so that solved Allison's most immediate problem, but it still left me feeling like unfulfilled — I'd tried to explain something I actually do understand, and utterly failed. It's been niggling away at me for the last few weeks, and just in time to record this show, the penny finally dropped, I was trying to explain what these sliders do without starting with how our photo editors model colour. We usually think computers model colours as Red, Green, and Blue values, so-called RGB, but that's literally only half of the story, it's how we store, transmit, and display images, but it's not how we edit them! When we load an image into an editor it gets transformed from an RGB representation into a more useful alternative representation, Hue, Saturation, and Lightness, or HSL. To understand both the channel mixer and it's close cousin the selective colour adjustment, we need to understand how both understand colour, in other words, we need to understand the HSL colour space.
What's the Problem with the RGB Colour Space?
As we all probably learned in science class when our teachers explained how televisions work, you can create any colour of light by adding more or less red, green, and blue light together. This means we can represent the colour of any pixel in an image with three numbers — a red brightness, a green brightness, and a blue brightness.
In this representation the total value of a pixel’s red, green, and blue brightness values will determine the apparent brightness of the pixel, and the ratios between the three brightness values will determine the pixel’s colour.
A pixel that’s 100% blue, 50% green and 50% red has a total brightness of 60% (200 out of a possible 300), and so does a pixel with 50% blue, 100% green, and 50% red, and indeed one with 50% blue, 50% green, and 100% red. The difference between these three pixels will not be their brightness, but their colour.
RGB is an efficient representation for storage and transmission, and it's how the physical pixels in our displays work, but it's a terrible representation for editing because of it's coupling of brightness and colour. To change a pixel's colour without affecting it's brightness you have to change at least two RGB brightness values, and the same is true of you want to change a pixel's brightness without changing it's colour.
HSL to the Rescue!
HSL exists because RGB is an inefficient way of representing pixels when the problem to be solved is editing rather than storing or physically displaying.
When you load an image for editing in an image editor each pixel's RGB values get translated into HSL values and the editor manipulates those values rather than the RGBs. It's when you save the file that the reverse transformation happens, and obviously, the graphics code that's used to render the image on screen is doing the same translation in real-time. The math to go between the two representations is trivial for a computer.
So, what is this HSL pixel representation? Each pixel still gets three numbers, but this time the numbers represent it's Hue, Saturation, and Lightness.
To understand a pixel's hue you need to imagine the rainbow as a line that runs from red on one end to violet on the other that you then close as a circle. When you do that you'll be surprised to find that it looks like a continuum. You probably thought there's be a clear break somewhere in the line, but there isn't, red and violet are actually as similar as red and orange! We can describe any colour by an angular position along this circle, and by convention we label red as being at zero degrees, with orange at thirty, yellow at sixty and so on.
The pixel's saturation is simply the intensity of its colour, with pure white being zero, light pastels being the low numbers, and the pure version of the colour in the rainbow being one.
The final value then is the pixel's lightness, this is simply how bright or dark it is, with black being zero and white being one.
Now, we can change colours without affecting brightness, and brightness without affecting colour. Changing the hue change the shade of the colour, and changing the saturation changes its intensity.
What's a Channel Mixer?
Now that we know how our editors internally represent colour, let's re-visit the channel mixer which I mentioned in LTP 131 when describing my monochrome adventures.
This is a tool for converting colour images into black and white images with more artistic control than we get by simply desaturating them.
Just like our photo editors can represent a colour image in HSL, they can represent black at white images as simply brightness values, one for each pixel. What the channel mixer does is convert individual hue, saturation, and lightness values for each input pixel into just a single lightness value for each output pixel. For each pixel, three inputs get converted to one output.
The naïve approach is to simply ignore the colour information in the input image and just copy the lightness values across un-changed. This is what happens when you convert and image by simply sliding the saturation to zero.
What the channel mixer lets us do is group the pixels into multiple sets based on their hue, and apply a different adjust me to each set. We have 360 degrees of hue to work with, so what most editors do is divide that imaginary circle into eight 45 degree segments, giving you eight sliders which map to:
- red
- orange
- yellow
- green
- aqua (a bluey greeney colour)
- blue
- purple
- magenta (a pinkier purple)
In effect, every pixel gets connected to one of the eight sliders based on its original hue.
So what do the sliders do? They apply a gain to that pixel's lightness value, letting your darken or lighten the resulting output value by some amount. Note that you're not adding or subtracting a set amount of lightness from each affected pixel, but multiplying the input value by a given factor. This is why the sliders all start in the centre of the slider labeled, which corresponds to multiplying the input value by 1 to get the output value, in other words, leaving the pixels lightness un-changed.
When you slide the slider to the right you are multiplying by 1.x, so 1.1, then 1.2, then 1.3 etc., making the pixels controlled by that slider a little brighter, more brighter, a lot brighter, etc.. When you slide the slider the other way you're multiplying by 0.x, 0.9, then 0.8, then 0.7 etc., making the controlled pixels a little darker, more darker, a lot darker, etc..
This is very powerful, because a lot of colour photographs have large areas with a similar colour, like blue skies, green grass, and so on. The channel mixer lets us nudge each region in a different direction to give us much more control over the resulting monochrome image.
What's a Selective Colour Adjustment?
Now that we understand the colour mixer, let's examine it's close cousin, the selective colour adjustment.
The fundamental difference here is that this time both the input and output images are in colour, so we don't have three values for each pixel becoming one value for each pixel, but three input values for each pixel being translated to three output values for each pixel.
Again, we're working HSL, so each pixel has an original hue, saturation, and lightness, and and output hue, saturation, and lightness.
We're presented with an extremely similar interface, because we're doing the same trick of grouping all pixels into one of 8 segments based on their hue, the difference is that we now have three sliders for each colour segment, a hue slider, a saturation slider, and a lightness slider.
We can use the hue slider in each segment to nudge the shade of each matching pixel clockwise or anti-clockwise around our colour circle. This lets us do things like make blue pixels a little pinker or greener, yellow pixels a little more orange or green, etc..
We can use the saturation slider to make the colour of each matching pixel a little more or less vibrant. Maybe we have a sunset where the sky has a lovely orange hue we want to emphasise, while the shadows have a blue hue we want to reduce, we can push the orange saturation up, and the blue saturation down, giving us the warm feel we want while simultaneously de-emphasising the cooler colours we don't.
Finally, we can use the lightness slider to brighten or dark the matching pixels.
What we're doing here is applying colour shifts in a fine-grained way rather than applying them to every pixel.
Emulating a Channel Mixer with a Selective Colour Adjustment + Desaturation
So, the final piece of the puzzle, can you get some of the power of the channel mixer in an editor that doesn't have one, but does have both a selective colour adjustment and a saturation slider?
Maybe. It depends entirely on the order in which the editor chooses to apply those two controls. If the editor does the desaturation first, then the selective colour adjustment has nothing to work with, but if the editor applies the selective colour first, then you can alter the different colour regions of the image separately before the colour information is thrown away.
So, the first caveat is obvious — if the ordering is wrong, you're SOL (straight out of luck, or similar ). There is also a second caveat — in my experience many editors only let you nudge the brightness for each colour segment a little bit, so you'll never get your blue skies to go as inky black as you could with a true channel mixer.
Final Thoughts
While my hook for this episode was disambiguating two confusingly similar sliders, the knowledge I'm most keen to share is actually an understanding of the HSL colour space. As a computer scientist and physicist I've been conditioned to think of colours in RGB for decades, which held back my understanding of powerful image editors like Photoshop and Lightroom for many years. It was the first time the HSL penny dropped that these tools finally started to make sense to me. The names of adjustments and sliders suddenly made a lot more sense, and their effects suddenly became a lot more intuitive to me.
Those of you from a fine arts background probably grey up with an HSL mindset from the very beginning, so you probably knew all this already. I hope you found the first-principles explanation useful thought. But my big hope is that my fellow STEM people have joined me in understanding colour in a new way.