Project: QGIS

Version: 3.24

Feature: Control the color model used when interpolating gradient ramps

When rendering a gradient ramp some combinations of gradient colors will cause the ramp to pass through murky grey mid-tones if the interpolation is performed using red/green/blue channels independently. An alternative approach is to instead interpolate colors via their hue/saturation/lightness or value channels. This approach can avoid these desaturated mid tones, resulting in more visually pleasing gradients.

We now allow the color specifcation to be set per stop in a multi-stop color gradient to give users control over which interpolation technique to use. There's also an option to control the direction which interpolation should follow for the Hue component of a HSL/HSV color spec interpolation,m which can help avoid unwanted interpolation through the entire rainbow hue spectrum in some circumstances!

This video shows the difference in mid-tones of a color ramp, where the RGB interpolation results in murky colors, while the HSL/HSV interpolation remains nice and vibrant.

This feature was funded by North Road, thanks to SLYR

This feature was developed by Nyall Dawson