Let's say I have a 18% gray card in my scene and I want to set the exposure manually.

When I take a picture of the gray card what should the RGB values be when exposed correctly? What is important is that I am asking for the linear RGB values so basically the values when storing the image as raw or the values before the image goes through the gamma curve.

I want to add that I am also asking this question with a 3D rendering background so if someone also knows something about that you are also welcome to elaborate.

Edit: I am specifically talking about digital cameras.

  • 1
    Asking about RAW values will be counter-productive, because black levels haven't been established in the raw. Tonal curves applied in the raw conversion are also going to matter. May 30 at 18:59
  • @MarkRansom As will color channel multipliers used to compensate for different types of light sources.
    – Michael C
    Jun 2 at 19:56

2 Answers 2


This Kodak Gray Scale, patch # 7 is an image of an 18% gray. The theory -- an object that reflects 18% of the ambient light is the middle of the photographic scale. If the camera exposure is spot-on and the film is developed to specification, the resulting negative (image of this object) will have a transmission density of 0.75 plus base fog density (about 0.10). If this negative is printed via spot-on exposure, and the photo paper is developed to specification, the image of this object will have a reflection density of 0.75. In other word, the object reflects 18% of the ambient light, the negative hold back 18% of the light that traverses the negative, the negative passes 82%. The resulting print of this object reflects 18% of the ambient light. The 18% target shade is the same original, negative, final display. The 0.75 density value.

Photo scientists use logarithmic notation base 10. Thus 10 elevated to the 0.75 power = 5.494. This would be the filter factor for a ND filter that corresponds to 18% transmission. The reciprocal 1/5.49 = 0.18. This decimal fraction expressed as a percent is 0.178 (0.18 rounded) X 100 = 18% (the reflection density).

Nobody said this stuff was easy! The 18% target has a reflection density of 18%. The RGB values for a monitor with a gamma of 2.2 (typical) reads 116R 116G 116B. Gamma is a measure of the steepness of a graph that measures contrast. Graph the readings of the gray scale and measure the angle of the upward sweep of the graph. We find this angle and then then using trigonometry find the TAN of this angle. This value is a measure of "contrast"
enter image description here

  • So basically when using a digital camera the normalized RGB value before gamma correction should read 0.18/0.18/0.18? May 26 at 17:55
  • @tempdevnova That depends upon how many bits your ADC uses. If your raw file format uses 14-bits, then the value should be 0.18 x 2^14 = 0.18 x 16,384 = 2,949 assuming you are going to use gamma curves in conversion that would translate 2,949/16,383 to 127/255.
    – Michael C
    May 26 at 19:07
  • @tempdevnova When you say "before gamma correction" are you talking about the gamma correction applied when demosaicing and converting raw values to 8-bit RGB, or are you talking about the gamma correction applied by your GPU before sending the signal to your monitor? Those are two different operations applied at two different points in the processing chain. Both are called gamma correction but they are two very different things.
    – Michael C
    May 26 at 19:12
  • @tempdevnova It also depends upon what CT/WB/CRI the light illuminating the scene is and what your target display CT/WB is. [0.18,0.18,0.18] in will only equal [127,127,127] out IF the light source illuminating the scene is an exact match for the desired output color profile. (e.g. D55 lighting for D55 display output, D65 lighting for D65 display output, and so on. If one uses D55 light to illuminate the scene and wants to display in a D65 environment, then inputting [.18,.18,.18] will result in an out put of something like [112,127,142].)
    – Michael C
    May 26 at 20:22

There's no such thing as "correct exposure." Especially when one is talking about digital photography.

As Ansel Adams demonstrated with his Zone System almost a century ago, the photographer should base exposure decisions on how much of the scene's dynamic range on wishes to the "squeeze" (for a high dynamic range scene) or "stretch" (for a low dynamic range scene) into the dynamic range capability of the final display medium.

If one obsessively exposes so that an 18% grey card will show up in the exact middle of a histogram generated by the back of camera JPEG preview image, then there's a very real possibility that one has:

  • Pushed details in highlights that one wishes to preserve over the edge and into unrecoverable full saturation.


  • Pushed details in shadows that one wishes to preserve under the edge and into the unrecoverable noise floor.


  • Done both at the same time if the scene's dynamic range exceeds the camera's dynamic range capacity.

So rather than blindly setting exposure using an 18% gray card, one should combine the results of spot metering the brightest and darkest details one wishes to preserve in the scene with measuring different exposure settings with an 18% gray card.

In general if one is shooting raw and the dynamic range of the scene does not exceed the camera's dynamic range, one should set exposure so that the brightest parts of the scene for which details are desired should will be just short of full saturation. If the desired result to make an 18% gray card exactly a mid-tone is darker than that, then brightness can be adjusted during raw conversion to bring it down. This will result in a higher quality image with less noise than if one were to expose "correctly" for the 18% gray card and leave the brightest details exposed significantly below the camera's full well capacity.

If the scene contains details that one wishes to preserve that are further apart than the camera's capacity to record in a single exposure, then one will need to create a series of exposures. The brightest exposure will be based on placing the highlights just short of full saturation as described above. The darkest will be based on placing the shadows just above the noise floor. The intermediate exposures will be spaced evenly between the two extremes. The more intermediate exposures one uses, the smoother the transitions from bright to dark will be when one combines the information from all of the exposures using one of several various so called High Dynamic Range image processing techniques.

Having said all of that:

If one desires to expose so that a "standard" (whatever that is, because there really isn't one when talking about converting linear raw luminance values to logarithmic RGB values) gamma conversion curve places an 18% gray card to the middle of of the tonal range of an output image, then one should expose so that the linear raw values are inversely proportional to the color channel multipliers used for white balance adjustment times around 0.18 of full well capacity.

That is, if one is shooting under tungsten lighting and one wishes to wind up with an image that looks "natural" to the eye, so that the colors of objects in the scene appear to be the same colors as when those objects are viewed under natural sunlight, then the linear values of the "red" filtered photosites will need to be higher than the linear values of the "blue" filtered photosites. On the other hand, if one is shooting under very high color temperature lighting, then the "blue" values will need to be higher than the "red" values by inverse proportion to the color channel multipliers that are to be used when demosaicing the linear raw values to arrive at color corrected RGB values.

So basically when using a digital camera the normalized RGB value before gamma correction should read 0.18/0.18/0.18?

It's not that simple with digital color photography, because you have to take into account what color multipliers will be applied to compensate for the color temperature/white balance/CRI of the illuminating light source when the raw monochrome luminance values are demosaiced and converted to RGB values at a target WB, such as D50 or D65, as well as what gamma correction curves will be applied to each color channel (they can be the same, but are very often different based on CT/WB and HSV adjustments applied during the conversion process).

  • so does that this mean that there is not a single "correct" way to expose a gray card? May 27 at 10:44
  • 2
    @ tempdev nova - The Gray Card is just one tool in the bag of tricks used to set our cameras. We often placed one in a scene lit the same as principal subject. We took readings of the card. We made negatives, slides, and prints featuring an 18% target. These were used as the litmus test for exposure. Modern cameras feature computer logic supersedes our methodolagy. The value of the Gray Card remains but its usefulness diminishes as the technology of instrumentation advances. May 27 at 13:55

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.