3 ms·
It's actually also about the interpolation path as well. Creating gradients in 3 component colorspaces is totally analogous to creating interpolation splines in
by fsloth 5y ago
It's actually also about the interpolation path as well. Creating gradients in 3 component colorspaces is totally analogous to creating interpolation splines in 3d euclidean coordinates.
The fixed points define only the end points of the splines. The space between the end points corresponds to the color value along the interpolation curve.
If we are in an rgb cube, we notice the "gray zone" is along the diagonal from (0,0,0 to 1,1,1).
If we take two colors opposite of this diagonal (say color_a={r=0.5, g=0.5, b=0.0} and color_b = {0.5,0.5,1
0} we notice if we linearly interpolate we go through gray (0.5,0.5,0.5) in the middle.
If in stead we move along a curved path that avoids the diagonal, trying to maintain the saturation we get a much nicer result.
This "curved path of roughly equal saturation" is easier to define in a colorspace such as HSV where the saturation is one of the spatial coordinates.
But as I always say, there is no theoretically "correct" way to define a gradient, only techniques optimized for some specific use case.
My personal opinion is that generally linear interpolation in RGB results in the least satisfying gradients but that is just my _taste_.