Good article on gradients. They are surprisingly subtle, and like everything to do with colour they are also surprisingly complicated. The GH2 gradient always interpolates in linear-RGB space, it doesn’t support other spaces such as CIELab or XYZ. However due to the linearity it does yield better results than just interpolation in sRGB, which is the most commonly used space.
Here for example you see what it looks like if you interpolate linearly through that linear-RGB space. The graphs underneath the gradient are drawn in (regular) sRGB values:
You can really see the gamma correction doing a lot of heavy lifting here.
There are however other interpolation modes the gradient supports. Such as Smooth (transitional colours are squeezed into a smaller region between the grips):
Cubic (very smooth, but can cause severe overshoots yielding “brighter than white” or “darker than black” intermediate results):
and Gaussian (tends to yield a duller outcome, and only works reasonably well if the grips are equally distributed, but it is the only completely continuous interpolation mode in that small changes to grip locations always result in small changes to the output gradient, even if that small change causes two grips to cross over):