Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m amused

# Photoshop: Linear Light Gradient in 16bpc Edit Subject

Hello

I know how to make linear light gradient in photoshop, just by setting the slider smoothness to 0. That's fine.

The problem is this doesn't work in 16bpc if I use a proper color space for high bitdepths like Wide Gamut RGB or ProPhoto, I instantly thought on differing gamma (against sRGB which indeed it works) and then I read the next in wikipedia:

"Unlike most other RGB color spaces, the sRGB gamma cannot be expressed as a single numerical value. The overall gamma is approximately 2.2, consisting of a linear (gamma 1.0) section near black, and a non-linear section elsewhere involving a 2.4 exponent and a gamma (slope of log output versus log input) changing from 1.0 through about 2.3."

Is there anything I can do or is the gradient tool targeted to sRGB only?
1 person has
this question
• Chris Cox (Sr. Computer Scientist) July 21, 2012 20:19
You're confusing several different concepts here.
The gradient tool works in color modes and values, not specific color spaces. It can convert between color modes (using the document and working space definitions as needed).

To make a gradient that is linear *IN VALUES* set the smoothness to zero.
But those are just values, not linear light (gamma 1.0) nor related to it in any way.

If you want to work in gamma 1.0, you need to use a document profile that has gamma 1.0.

What, exactly, are you trying to do?
Most people that try to work in gamma 1.0 are doing so because of a misunderstanding (or an old misinformation website that is quite thankfully gone now).
How does this make you feel?
I'm
• I thought linear light meant values disposed in a linear way, just like if working in gamma 1.0. Otherwise I would get suboptimal *values* just to adequate to a linear representation of a 2.2 display gamma.

Anyways setting the smoothness to zero is not enough for getting linear *values* in case you work outside sRGB (or untagged!) in 16bpc, please do test yourself!! (blacks are a bit off)

As another matter, I don't work in gamma 1.0. I read something long ago when I was doing CG so I didn't need to use ungamma nodes in textures, but it's not the case. I'm just doing some tutos and wanted to show off dithering in a simple way.
• Chris Cox (Sr. Computer Scientist) July 21, 2012 21:44
Linear light just defines how the values are interpreted with respect to measured light, and equals gamma 1.0.

Linear light means that the values are intended for display in gamma 1.0, or sampled from a device with gamma 1.0.
• Chris Cox (Sr. Computer Scientist) July 21, 2012 21:45
If you set the smoothness to zero, you get linearly interpolated values for the gradient. Again, that has nothing to do with sRGB or gamma 1.0 -- it's the same for all colorspaces.

Do make sure that you have dithering turned off when drawing the gradient, otherwise that will throw off your perfectly linear values (assuming you want some sort of calibrated ramp).
How does this make you feel?
I'm
• Another test, very strange:

32bit untagged RGB Color Space (I don't know of any gamma 1.0 color profile), make a gradient, then go to 8bit (set gamma as 2.2 in the settings). If you have set your working space as AdobeRGB it's correct, if otherwise you have sRGB as your working space the gradient is not linear.

I'm just trying to keep an optimized workflow between bitdepths and color spaces.
• Chris Cox (Sr. Computer Scientist) July 21, 2012 21:47
In 32 bit/channel, you are always working in gamma 1.0.
(you can always create a gamma 1.0 profile for other bit depths)

When you converted from 32 bit/channel down to 8 or 16, you probably got a gamma rendering to the target colorspace (from gamma 1.0 to whatever the gamma is for your RGB working space).
How does this make you feel?
I'm
• aaahmm ok lol. You like correcting and explaining my wording and concepts, that's nice and I thank to you, but what about solving the real issue? have you got your hands on testing it? it doesn't work.

I repeat it DOES NOT work.

I don't feel like chasing my tail, post-wise, not today.
• view 1 more comment
• I'm not getting anything new I didn't already know from your posts, your wording is very nice for newbies to understand and all but I'm just explaining a fact.

Create a New Document, 256px wide, Wide Gamut RGB profile 16bpc.
Click on pixel 0, shift and point click again on pixel 255.
Convert to sRGB profile (here is where linearility is lost)
Convert to 8bpc

The last 2 steps I'm not sure whether is more optimized to switch the order, but in any case the linearility is lost in the profile conversion.
• Chris Cox (Sr. Computer Scientist) July 21, 2012 23:28
No, you're not explaining a fact. You are explaining your mistaken understanding of how things work. I am trying to correct your mistakes so you can understand how it works.

Converting a linear ramp in one encoding to another encoding is going to result in something that is not linear (because it is preserving the appearance, not the values). If you want a linear value ramp, don't convert colorspaces, only only assign colorspaces (retagging, preserving the values). Again, the tool does not depend on any particular colorspace -- you just made an unnecessary conversion and changed the values.

And if you decrease the depth, you may also add additional dithering.
How does this make you feel?