How to optimize your “gray working space” for better luminosity masks

Few aspects of photography cause more confusion and frustration than “color management”. I wouldn’t blame you for wanting to throw your hands up and just pray for decent results rather than trying to figure it out. But it’s worth investing some time in understanding it if you want the best quality images.

It turns out that color management affects luminosity masking in surprising ways. If you optimize properly, you’ll get the luminosity masks and selections you expect. If you don’t, you may find issues such as white in areas of your layer mask you thought you protected. (Note: If you believe you’ve got this covered by setting your gray gamma based on your RGB working space, be sure to keep reading… that setting does not have the impact you may be thinking).

There are several Photoshop preferences for “working spaces” (under Edit / Color Settings). These are the color spaces Photoshop will use there is some ambiguity. For example: If you go to Image / Mode / RGB, your image must be converted to a specific RGB profile, but this menu command gives you no way to specify which one. So Photoshop will use the RGB working space in that case (unlike when you use Edit / Convert to Profile, where it will use the RGB profile you select). Or if you open an RGB image which does not have an embedded profile, Photoshop will assume your working RGB profile for this ambiguous image. But that is rare, and the RGB working space setting won’t matter if you are working with images with embedded profiles (which you probably are and definitely should be).


The importance of the Gray Working Space

The Photoshop preference for the “gray working space” sounds like it wouldn’t affect your color images. But it actually has a significant affect on your RGB images if you use luminosity masks and selections, as channels are always treated as grayscale (even within RGB image). The reason is because your RGB pixels (even if they are black and white RGB) must be converted to grayscale pixels when working with luminosity masks. The midtone gray values for both RGB and grayscale spaces are specified by a “tone response curve”, which is typically a “gamma” value. The math involved is complicated, but the bottom line is that your RGB “gamma” and grayscale “gamma” should match if you want high-quality luminosity masks and selections. Otherwise, the conversion will be too dark or too light (i.e. the luminosity mask will select too much or too little). And in the case of painting through luminosity selections, things get worse with multiple brush strokes, resulting in problems with exposure blending or dodging and burning.

Photoshop does not automatically match “gammas” for you (though Lumenzia will as described below). Photoshop just assumes the “gray working space” is correct and uses it no matter what RGB space is embedded in your image. And unlike the RGB space used for your image, the gray space for your masks/selections is never embedded so the grey working space always affects any conversion between RGB and grayscale. This includes the creation of luminosity masks, luminosity selections, and even the way your paint color may affect your layer mask when brushing without luminosity masks or selections. And because it is the relationship between the actual RGB space (the embedded profile, not the working RGB color space), the correct working gray space choice is not based on the working RGB, it depends on the document on which you are working. So you should ideally be confirming/updating the gray working space under Edit / Color Settings every time you open a new image or change documents if you want the highest quality luminosity masks and selections.


What happens if you use the wrong gray working space?

The most common gammas used are 1.8 (ProPhoto) and 2.2 (Adobe RGB is 2.2 and sRGB is very close though best matched using “sGray” in newer versions of Photoshop). If you use more exotic color spaces, you may run into other gammas (such as gamma 2.4 for Image-P3 or gamma 1.0 if you use lines profiles like ACES for video or computer graphics), and these problems will likely be worse when mismatching these more unusual gammas.

If you use the wrong working gray space (comparing gray gamma 1.8 vs 2.2):

  • The mask/selection will be stronger than expected when using the wrong gamma with ProPhoto RGB (wrong being 2.2 here). This is is bad because it means that areas you expect to be protected will likely change far too much when painting through a selection, resulting in dodging or blending areas of the image which should be protected. The difference can be substantial. For example, what should be a 3% selection would become a 5% selection, or 10% becomes 15%. So each time you paint outside the lines, the damage builds up an extra 50% or more in areas which you want protected. Completely deselected pixels are still completely deselected, but luminosity selections include of near deselected values that protect your image too. Getting the wrong results at the transitions is a recipe for frustration and poor results.
  • The mask/selection will be weaker than expected when using the wrong gamma with Adobe RGB or sRGB (wrong being 1.8 here). This isn’t ideal, but is less of a concern, as you won’t be prone to accidentally painting in areas you thought were protected.
  • If you create masks without using luminosity selections, they are also affected, but the impact is not as great. When working with selections, the error gets worse with each brush stroke and can therefore have a greater impact. So creating luminosity masks by painting through luminosity selections (which you should do for exposure blending or dodging & burning) will mean that mistakes in the gray working space are more problematic.

Of course, there are other gray spaces and they have different degrees of failure. If you never set your gray working space, it is probably some default 15-20% “Dot Gain”. 20% Dot Gain is closest to gamma 1.8, and 25% is the closest to 2.2 (30% is also close, but brighter and therefore a worse error). In any case, you shouldn’t use any of the dot gain spaces if you want optimal luminosity masks.

Lastly, you might be wondering how the choice of working gray space if you work in black and white. It does not matter for two reasons:

  1. Black and white work should be done in RGB mode, not in Grayscale mode. The only benefit I can think of for grayscale color mode is that it creates smaller documents. RGB offers the ability to use the original image color to make more targeted masks and selections, access to the full range of Photoshop and 3rd party tools (including luminosity masking software), and the ability to add a bit of color tone to your black and white image. Unless you work in newsprint, I strongly recommend RGB for your black and white work.
  2. Even if you disagree and wish to work on your in grayscale mode, you can embed the grayscale profile so that the working gray space does not affect your work (just be sure to convert to grayscale by using Edit / Convert to Profile instead of Image / Mode, so that you can specify which grayscale profile you wish to use and ignore the working gray space).

Also note that if you convert RGB profiles, your layer masks are not adapted during conversion (your grayspace does not matter, so any change in the RGB gamma will produce different layer masks if there is any other than pure black or white in them). As a result, the appearance of your image may change substantially (this is a good example why Photoshop sometimes warns you to flatten layers when making changes). This is a very good reason to create a FLATTENED copy of your ProPhoto RGB image before converting to sRGB for the web (Adobe RGB is fine because the 2.2 gamma in Adobe RGB and L* tone response curve used in sRGB are very similar).


What to do if you use Lumenzia?

Fortunately, if you use Lumenzia, you don’t have to think about any of this. Starting with v8.1, Lumenzia will automatically optimize your working gray space automatically for every document. Even if you are constantly switching between documents with different RGB profiles, Lumenzia will update the working gray space to the optimal result anytime you create a mask or selection. It supports all major (sRGB, Adobe RGB, ProPhoto RGB) and secondary RGB working spaces (eciRGB v2, beta RGB, ACES CG, REC 2020, any many more). If you edit your master file in an unknown RGB space (such as device-specific profile for your printer paper profile), the gray working space default to the safer gamma 2.2. By default, this option is enabled – so if you’ve updated to Lumenzia v8.1, you’re already getting the best quality results automatically on all your images.

If you wish to retain full manual control, Lumenzia also offers you that option too. Simply go to the Utilities menu in Lumenzia and disable the option to automatically optimize the gray working space and it will leave it alone.

Please note that Lumenzia never changes the RGB profile of your document, this feature only affects the working gray space to give you the best possible luminosity masks.


What to do if you use my free panel or another method for creating luminosity masks/selections?

Any time you work with an image which uses a different RGB color profile (the embedded profile is what matters, not the working RGB space), you should ideally update your Gray space to get optimal results. But updating it for every document manually is painful and prone to making mistakes. Instead, I would recommend one of the following approaches as the most reasonable solution for manually managing the gray space with minimal masking issues:

  • If you use ProPhoto RGB exclusively for all your images, set your working gray space to Gray Gamma 1.8.
  • Otherwise, set your working gray space to Gray Gamma 2.2 (even if you occasionally use ProPhoto, as the errors with gamma 2.2 are more tolerable as described above). Gray Gamma 2.2 is the right choice for Adobe RGB and is very close to the slightly more accurate sGray that should ideally be used with sRGB (note that you don’t have an sGray should for Photoshop CS6 or older, so Gray Gamma 2.2 is your best choice anyway). This is a very reasonable approach (prior to Lumenzia v8.1, this was my general recommendation, as manually updating for every document is tedious and prone to errors.)

These won’t give you perfect masks every time, but should be close enough to avoid the worse issues with mismatched gammas.




See the store page for Lumenzia and course info.
See licensing for Commercial and Creative Commons (Non-Commercial, Attribution) Licensing terms.
Join my affiliate program.
See my ethics and privacy statement.