I am working on a raster file on which I applied a color ramp ("bcyr") in continuous mode and linear color interpolation to have a smooth effect. This works nicely.

But if a reduce the [min max] interval to something else than the [min max] of the data, there is huge amount of red and blue for values out of my new range.

For example, if data are ranged from 0 to 100 and I want the color ramp to be applied only on data from 0 to 5, every out of interest data above 5 will have the maximum color value (red here).

How to make every data strictly higher than 5 being greyed, thus fitting the color ramp only to data of interest ?

2 Answers 2


Add value slightly above or below with grey or transparent color.

For example for 5 add 5.00001 with grey or set opacity of color from 100% to 0% to make it completely transparent. Same for lower values, for below 1 make new color for 0.99999999.

Raster color settings


Another option is that you can set transparent range for the values out of interest, but you can put only integer values, because fractional numbers are not acceptable, as you can see below

enter image description here

You can put the range From 6 to 100 with 100% transparency, and all the values within this range will be transparent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.