# Why colour not showing in custom contour plot

**URL:** <https://community.plotly.com/t/why-colour-not-showing-in-custom-contour-plot/88982>\
**Category:** plotly.js\
**Tags:** question\
**Created:** [November 26, 2024, 10:36am UTC](https://community.plotly.com/t/why-colour-not-showing-in-custom-contour-plot/88982 "2024-11-26T10:36:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aire](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@Aire](https://community.plotly.com/u/Aire)\
**Post date:** [November 26, 2024, 10:36am UTC](https://community.plotly.com/t/why-colour-not-showing-in-custom-contour-plot/88982/1 "2024-11-26T10:36:08Z")

</div>

Hi all,  
Thank you for this forum, It’s very useful.  
I’m trying to set custom contour levels as seen in some posts here.  
I want limits of contours to be these fixed values: 0-500-1500-3000-10000-30000-150000  
To build the colorscale I divide these values by the maximum value of data I have (31000 in the example below). That is to say:

```auto
Plotly.newPlot("graph", [
  {
    type: "contour",
    z: [[400, 400,2000, 2500], [7000, 20000,2000, 31000],[1200, 1200, 2000, 2500]],
    colorscale: [
      [0, 'rgb(204, 255, 204)'], [0.01612903225, 'rgb(153, 204, 51)'], [0.04838709677, 'rgb(51, 153, 102)'], [0.09677419354, 'rgb(255, 153, 51)'], [0.32258064516, 'rgb(250, 135, 135)'], [1, 'rgb(255, 0, 0)']
      ]
    
  }
]);

```

But… I don’t know why some colours don’t appear. I would really appreciate help because I have tried many configurations and none of them worked. I don’t know if it is impossible to do it or there is some error in my code.

Kindly advice,

---

<div class="post-metadata">

**Author:** ![Aire](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@Aire](https://community.plotly.com/u/Aire)\
**Post date:** [November 29, 2024, 8:17am UTC](https://community.plotly.com/t/why-colour-not-showing-in-custom-contour-plot/88982/2 "2024-11-29T08:17:20Z")

</div>

Using the ‘ncontours’ It was fixed
