Until then, have a look at this online gradient generator tools that can use five different algorithms (there's some explanation provided as well for each method):
http://davidjohnstone.net/pages/lch-lab-colour-gradient-pick...
I also recommend reading the superb 'Subtleties of Color' NASA article series on the matter:
http://earthobservatory.nasa.gov/blogs/elegantfigures/2013/0...
PS: I'm slightly confused about your comment on the black to white gradient though. Are you saying the gradient on Figure 1 looks more even to you than on Figure 2? In that case, I think your monitor is miscalibrated, so try gamma-calibrating it first then have another look. Your opinion might change :)
All of your color gradients use a constant light output. You transition from one fully saturated primary to another, or two fully saturated primaries to two others. For that to look natural, the interpolated values should also produce a constant light output.
The grayscale ramp is not a constant light output, and the light intensity needs to follow a perceptual curve to look natural.
This is not how light behaves (it doesn't divide by two on a wall), but it's what you need to make a gradient.
When selecting your initial color palette, though, it is true hue and saturation do have nonlinear perception.
There are (somewhat complicated) color spaces designed to deal with that: https://en.wikipedia.org/wiki/Lab_color_space
http://www.husl-colors.org/ lets you play with a compromise color space.
But I wonder about what the "right" way to blend gradients really is -- the article shows how linear blending of bright hues results in an arguably more natural transition.
Yet a linear blending from black to white would actually, perceptually, feel too light -- exactly what Fig. 1 looks like -- the whole point is that a black-to-white gradient looks more even if calculated in sRGB, and not linearly.
So for gradients intended to look good to human eyes, or more specifically that change at a perceptually constant rate, what is the right algorithm when color is taken into account?
I wonder if relying just on gamma (which maps only brightness) is not enough, but whether there are equivalent curves for hue and saturation? For example, looking at any circular HSV color picker, we've very sensitive to changes around blue, and much less so around green -- is there an equivalent perceptual "gamma" for hue? Should we take that into an account for even better gradients, and calculate gradients as linear transitions in HSV rather than RGB?