Tiff image is not in rainbow color

I use the following request to get the ndvi tiff image, and it worked well so far:

Few months ago, I started getting tiff images only in grayscale, for the same request.
Does anybody know, how can I get an image in rainbow colors?

Note: If you want test my request, please just fill your api key on the {myapikey}.

Hi @milos.zinajic,

I tested your request, opened the tiff image in Qgis and I get this (I presume this image looks like what you expected) :

For the EVI-RAINBOW layer, I used this evalscript:


let viz = ColorGradientVisualizer.createBlueRed();

function evaluatePixel(samples) {
    let val = 2.5 * (samples.B08 - samples.B04) / (samples.B08 + 6 * samples.B04 - 7.5 * samples.B02 + 1);
    val = viz.process(val);
    return val;

function setup() {
  return {
    input: [{
      bands: [
    output: {
      bands: 4

I hope it helps,


@dorothyrono, thanks for the answer, that is the color I want to achieve.
Howewer, I have no idea how can I achieve this from c#.
Is there any way to get an image directly in rainbow color?


I am sorry I know nothing about c#. I can’t help there

But if you want to use the same request you sent above to get the tiff images in rainbow colors, you will first need to create EVI-RAINBOW layer in your configuration.

Here is how you can create it. https://www.sentinel-hub.com/develop/dashboard/

I am sorry if I didn’t understand your question well.

Just let me know if you still need help.


@dorothyrono, thanks a lot, I didn’t know about develop/dashboard part, I took over the project from my colleagues who obviously did it.

When I logged in there I found the following info:

Scripts and products converted to V3.
All V1 and V2 evalscripts have been automatically converted to V3 on November 2, 2020.

That is actually a date I started receiving grayscale pictures.
I’ll try to fix it according to your script, so if I there is a problem, I will write to you.


All the best !

Let us know if you get stuck