That's a linear gradient, as it's just a linear interpolation of two RGB values.The second one is created in sRGB space.
I guess you could say that if the two inputs were sRGB colours, then the output is an sRGB gradient -- but seeing black/white are the same in linear and in sRGB -- it's basically a linear gradient (being displayed on an sRGB device).
That's also a linear gradient approximately transformed to sRGB, because the sRGB curve is approximately equal to the "gamma 2.2" curve. This is what I'd call an sRGB gradient (except using the proper curve, instead of the pow2.2 approximation)First gradient is created in linear space and gamma corrected.
N.B. In both sRGB/Gamma2.2, 187 equates to 50% black/white. In linear, 128 corresponds to 50% black/white.
Theres a reason for this -- if your monitor is correctly calibrated as an sRGB device, then when standing back from a black/white checkerboard image and squinting, it will appear exactly the same as an image filled with 187 grey. An image filled with 128 grey will appear much darker than the (averaged due to distance/squinting) black/white checkerboard.Now according to http://filmicgames.com/archives/354 if you resize a 2 pixel image, where one pixel is white and second is black then the resulting pixel should have color (187,187,187). So the middle color of the gradient should be (187,187,187) - just like in the first gradient.
this isn't a fair visual comparison because you're skipping over a huge number of values in your first gradient. After 0/255, your second value is 21/255 (pow(1/255,1/2.2)*255), so you've skipped 19 shades in there! Your first gradient would have to be almost 200000 pixels wide for you to see all the unique 256 shades of grey in the 8-bit gamma 2.2 gradient.On the other hand second gradient looks better.
The second one might look better because it's made up of 256 unique shades, whereas your first is only made up of 183 shades.
Even though, as above there is a mathematical reason for 187 being "middle grey", if you're using this gradient for an artistic purpose, then the "best" gradient is going to be subjectively defined, not mathematically defined.
If this is the root problem, can you describe it a bit more -- e.g. what this gradient is for?when you set up a gradient on a button from black to white it looks bad and graphic artists don't like it
Also there's something weird with your gradient images; the labelled shades are to the left of their markers by a bit.