I’m using CubicSpline at the moment to create colour gradients. Gradients are basically defined as sorted tuples of doubles and colours. At the moment I’m creating four separate cubics (one for red, one for green, one for blue and one for alpha), but I’d rather move to a system that supports various colour models and in this wider scheme it would be a lot easier if I could get the contribution of each of the surrounding colours.

Is it possible to achieve this using the CubicSpline class? Something like the following: