2

TLDR: Editing software does never indicate clearly how effects operate in terms of color spaces, gamma ramps and whitepoints. Why?


Since I learned a lot about colorspaces, whitepoints, gamma ramps, with all the glorious details, I started wondering about pretty much every single application, in what color space and with what gamma ramp they operate.

For example in Photoshop / Premiere Pro / GIMP / Lightroom:

  • Curves, Levels
  • Blending modes (like Add)
  • Channel Mixer
  • HSL / HSV (these are transformations of an RGB colorspace, but which one?)
  • The color picker (aka eyedropper) tools (particularly in Lightroom)
  • ...

All of these operations happen in a colorspace, with a gamma ramp. Why do applications not indicate this? This information is very important to me.

Some examples to support why this is important (skip these if you know why):

  • Stupid artificial example: you want to add a sun to a picture. The physically correct way to do this is to make sure the picture of the sun and the background picture are in the same additive colorspace using both a linear gamma ramp and add the corresponding values together. Doing this in a mismatched colorspace or with an sRGB gamma ramp would make the effect physically incorrect.
  • Due to the lack of a Lightroom-like-camera-calibration effect in Premiere, I was trying to recreate this effect using a channel mixer effect, which does a matrix transformation on the color. But again: I don't have a clue wether or not this effect first converts the color to a linear additive colorspace or not. Do I have to add in gamma correction before and after the effect?
  • When examining a color in Lightroom with the eyedropper. The indicated values: what color space are they in? The RAW RGB from the camera (most likely not when examining values)? sRGB? ProPhoto RGB? Are these gamma corrected?
  • Imagine you have a hazy (aka foggy) photo and want to reduce/remove haze. First thing to ask yourself is: what is haze? I would argue it is light reflected from water particles and add extra light to the sensor of your camera. Meanwhile, it is blocking out some of the original light from the landscape. So, the fix would be to subtract the corresponding RGB values of the spectrum of the light reflected by the fog, and finally increasing exposure. But... what colorspace do I have to project the light spectrum to? Does the tool I am using (typically "Curves" or "Levels") to subtract this value do gamma correction (aka: are the color values in linear light, like I need for this effect)?

In general, often when I am editing, I'm thinking about how the look I want to achieve would have manifested itself when it happened spontaneously in nature. Thinking about this gives me an idea of what I want to try to make an effect. But then comes the problem: what do all these effects exactly do, in which colorspace and with or without gamma correction. Then I haven't even talked about whitepoints yet.

I know that some effects are unaffected by the colorspace or gamma ramp of the color values (like exposure), but there are many effects where this is very important. But for a fact, up to this day, I still don't know wether or not Photoshop performs the Add blending mode in physical linear light, or in sRGB gamma light.


So the question is: Why is this so unclear in these applications? Is there documentation for at least one application that explicitly talks about this? Meta question: would any of you be interested in knowing all this information, in order to know exactly what you are doing to your photo or video?

5

Most editing software cares very much about colorspace. The issue is that users don't usually understand it (because it's very complicated), and even when they do, they often expect contradictory results from their software.

For example, Adobe Photoshop allows a user to set the working color space for manipulating their images. The vast majority of PS users probably want the results they've always gotten from the application, even before it had the functionality of setting the working colorspace. That means working in sRGB, even if it's not physically representative of how light works. In fact many of the blend modes, for example, are tailored to imitate linear light blend modes with non-linear RGB values. Screen in sRGB gives similar results to Add in linear RGB.

Fast forward to present day where many apps let you set the working space. Let's say a user thinks they want to use linear RGB to be more physically accurate. Suddenly nothing works like it used to! The Screen blend mode produces weird results! Contrast looks completely different! No amount of telling users, "This is what you asked for" will sell more copies of that software if it produces unexpected results.

And when a particular function works in a different colorspace internally, there's rarely a need for the user to know that. If it produces the results the user wants, then does it matter if it's HSV internally or HLS? or YCbCr? Or L * a * b?

  • This makes sense, of course. So what you say is that blend modes operate in the colorspace of the document (presumably sRGB, with sRGB gamma). For many effects, it is less important in which RGB colorspace they happen, i.e.: which primaries. However gamma ramp seems very important for many effects (like the color mixer). Can I assume everything happens in the gamma ramp of the document, and no effect will convert to linear light? – Martijn Courteaux Jan 6 '17 at 9:32
  • 1
    It's a little more complicated than that. For the most part, most effects will work in the working space. (And note that the working space can be set to be different from the document's colorspace in some applications. That's an important distinction.) Furthermore, in some applications, some particular filters or other functions may choose to do conversions to either linear light or other colorspaces without that being obvious. There's no easy way to know, though it may be possible to run tests to figure it out, depending on the function in question. – user1118321 Jan 6 '17 at 17:22
1

I haven't looked at the other apps, but with respect to Photoshop CC, you can have the colorspace information display in the window pane at the bottom.

Photoshop info

The preference saves between sessions and, while not super obvious, does put it visible in your workspace. You can also add it to the info panel flyout, just select the panel options for the panel and chose document profile to be included.

As to why these are not obvious? That would be entirely speculation on my part, but clearly there hasn't been that strong a demand for it.

1

You can choose the working gamma in the apps you mention — In Photoslop it's the "RGB Working Space".

The "tools" you mention are all colorspace AGNOSTIC, in that they are all working directly is RGB values not relevant to any particular space.

In particular, you asked:

HSL / HSV (these are transformations of an RGB colorspace, but which one?)

No, they are not transformations of a colorspace. They are "convenient" ways to choose colors for the RGB colormodel. They work directly on RGB values regardless of the color space.

When it makes sense, some tools may be written to go to a linear space to do the actual "work" before returning to a gamma encoded space.

But the upshot is, if you want to work in linear (or a particular space), then setup your workspace that way. It's easy for most apps including PS and Gimp. Premiere I think defaults to Rec709, if you want to work in linear for video I suggest using AfterEffects.

ON LINEAR AND OTHER SPACES

Depending on what you are doing, you may want to be in linear, or perhaps in a space that uses a curve similar to perception (i.e. sRGB or LAB*). I discuss this issue at length on the StackMathematica with lots of examples. Part ONE and Part TWO.

Please let me know if you have further questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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