# Is it possible to simulate any color-only filter with curves?

In this question it was asked whether it was possible to reproduce any color-only change to an image using just curves. In my answer, I said that there were color-only changes such as conversion to monochrome, changes to saturation, and others that couldn't be reproduced using curves as they involve more than just adjusting the input-to-output curve of the 3 separate channels, or even all 3 at once.

RyanFromGDSE commented that my point was incorrect. So, I'd like to understand how one can use just curves for more complex color changes. Here are some examples that don't seem immediately obvious to me:

# Monochrome

To convert to monochrome, I've used the Channel Mixer adjustment in Photoshop and for each output channel set it to be 21% of the input red, 72% green, and 7% blue (so roughly the same as the conversion for Rec. 709 Luma).

Original:

Monochrome:

This transformation involved not only scaling each of the channels but adding them together, and then distributing that result to all 3 channels. How does one achieve that with curves?

# Saturation

I'm also curious about other transformations like saturation. If I want to increase the saturation of blue without increasing the saturation of cyan and magenta, I don't see how to do that with curves. For example, if I have = <0.25, 0.25, .05> and I increase the blue, it becomes <0.25, 0.25, 0.75> and increases the saturation of that color. But if I started with <0.6, 0.25, 0.5>, after applying the curve, I'd end up with <0.6, 0.25, 0.75> which is not a more saturated version of the original color. It's just a more blue color.

# Others

I'm also curious about others, such as channel swapping, or something like a gradient colorize where the image is converted to monochrome and then a 1D LUT is used to replace gray levels with a set of colors in the table.

# Update

So it's become clear that the case originally referred to meant using curves in a hue/saturation (or if you prefer luma/chroma) color space, such as L a* b*. Since that involves converting to a different color space and then applying curves, it is not using just curves, so doesn't satisfy my original assertion.

• Interesting question. It's a bit "inside baseball" for most perhaps, but I don't understand the downvote. – scottbb Apr 8 '17 at 14:52

Hum. You can not do some transformations with curves alone if your image is on RGB mode. All depends on what information you have on each channel.

Here is a simmilar question: What's the best method to change colours in a photo to another specific color? asking color changes using curves or levels.

You can not "desaturate" a color image using curves alone.

What saturation means in terms of comparing the 3 channels is that you have the same information on each channel. But on a color image you do not have that.

On this example we have the same information on R and G but totally diferent one in B.

The only way to desaturate an image using curves is to flatten the curves to an horizontal line, so you have a neutral flat gray, white or black. You made all channels with the same information... none, which technicly if they are the same is a non saturated image.

Using curves is a manual way to manipulating proportions, but it is an uncontrolled one because diferent proportions can change the hue.

There are several ways a computer separates an image to work with color, and some other channels exist that can be more usefull, for example Lab mode or HSB, HSL modes. Photoshop only has Lab mode, but other aplications like PhotoPaint has HSB and HSL.

And now... yes you can do color changes with curves...

I must say that Photoshop has no intrinsec way of using HSB channels instead of HSB, neither Photopain, but Photopaint can split a RGB into 3 separated Grayscale images containing each H+S+B information (and some variants like HSL)

Ok If I simply mask one zone on the H channel, play with the curves, and recombine I played with the hue of this zone.

If I do not mask anithing and play with the curves on this channel I can completly change the hue of the colors.

Red is not afected because in my curve black remained black, that correspond to red in that channel.

And If I now play with the saturation channel, and make it all black (I can do that moving the curve all the way down) I am telling the image that all is going to be desaturated.

You can tweek colors using a diferent color mode than RGB, for example play with Lab mode, but I repeat, all depends on what information you have in channels.

There is for example a Jpg editor (that I will try to find) that works with different channels rather than RGB. A Jpg image, when processed, is converted to a diferent color space called Y', CB and CR, simmilar as how the color TV signal was processed some years ago. In thoose diferent color modes yes you can manipulate things like converting an image to monochrome.

• So this was my contention in my answer to the other question as well. This makes perfect sense to me, so I'm curious to hear if there's something you and I are missing. – user1118321 Apr 8 '17 at 20:45
• I added some more explanations, so take a look. – Rafael Apr 9 '17 at 1:03

Doesn't this miss the basics of conversion to monochrome? Our eye sees the intensity of green as stronger, and of blue as weaker. Big differences, but our perception depends on the color.

So when television converted color scenes to grayscale reproduction, they used the NTSC conversion formula of Luminosity = Red x 0.3 + Green x 0.59 + Blue x 0.11

This reproduces grayscale to match the tones the eye would have perceived it. Or how B&W film reproduces it. Everyone tries to match the way the eye perceives color.

Simply desaturating would emphasize blue greatly and de-emphasize green greatly, unrealistically, not the way the eye would see it.

Using the Channel Mixer allows any modification you may seek (called editing), but it is not the same as a standard grayscale conversion (which the editor Grayscale menu does correctly).

• I did exactly what you suggest. Only instead of the NTSC conversion, I used the Rec. 709 (BTU 709) conversion that's used for HD TV instead of the SD one. – user1118321 Apr 9 '17 at 15:24
• Your picture has no actual blue or green, so largely unjudgeable. The red is bright, but it is dark in monochrome (like orthochrome film). Does that seem accurate? The luminance formula is slightly different because ATSC purposefully restricts graphics color to 16-235 (called legalization). – WayneF Apr 9 '17 at 16:23