Gradient by palette index

For indexed images, allow gradient fills to interpolate along the range between two palette values, rather than between the foreground and background colors.

For example, if your palette is:

[ red, orange, yellow, green, cyan, blue, various ugly purples ]

Trying to create a gradient between red and blue at present will interpolate in RGB space, picking colors from the palette which best fit this need, using the ugly purples.

The proposed alternative mode would interpolate the palette indexes, giving you a red-to-blue hue spectrum, via the yellows and greens.

(This would also be useful for carefully curated ordered palettes where you really want a gradient to use e.g. blues from a certain block, not some other blues it finds that are closer in RGB space.)

so you want a palette editor like therest of us?

I need this too, I have nice gradients made manually in my palette, say index 4 to 10 are nice shades of Red to Yellow to make a fire effect, I want to chose 1st and last indexes (or the range) whatever works and drag my gradient, it should use those chosen colours in order of index so I get the effect I want and not something automatic. =)

It should also work with the various dither modes please.