# Colormaps with fixed mapping between scalar and RGB

**URL:** https://discourse.paraview.org/t/colormaps-with-fixed-mapping-between-scalar-and-rgb/7153
**Category:** ParaView Support
**Created:** [May 5, 2021, 12:54pm UTC](https://discourse.paraview.org/t/colormaps-with-fixed-mapping-between-scalar-and-rgb/7153 "2021-05-05T12:54:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rojj](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rojj/32/1409_2.png) [@Rojj](https://discourse.paraview.org/u/Rojj)
#### Post date: [May 5, 2021, 12:54pm UTC](https://discourse.paraview.org/t/colormaps-with-fixed-mapping-between-scalar-and-rgb/7153/1 "2021-05-05T12:54:51Z")

</div>

Currently I am defining custom color maps following this [guide](https://www.paraview.org/Wiki/Colormaps). The problem I have is that the colors are scaled when the data range changes. Unless I am missing something.

I am trying to create a colormap like this one

 ![image](https://discourse.paraview.org/uploads/default/original/2X/5/5f15c1ef0c9351245b0a8fca11f503b3c00aa0d2.png)

In this map the mapping between scalar values and RGB is fixed and the colors should not change if I change the data range to, say, [0, 32]. In this example I would see only the three colors: light blue, green and pink.

The images are initially generated via a python script but the user can rescale the data range.

I guess I could add the RGB colors in the VTK file itself (legacy VTK), but I wonder whether there is a different, simpler approach.

Thanks!

---

<div class="post-metadata">

### Author: ![dmreagan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dmreagan/32/12030_2.png) [@dmreagan](https://discourse.paraview.org/u/dmreagan)
#### Post date: [May 7, 2021, 8:29pm UTC](https://discourse.paraview.org/t/colormaps-with-fixed-mapping-between-scalar-and-rgb/7153/2 "2021-05-07T20:29:36Z")

</div>

Try setting `Automatic Rescale Range` to `Never`. This setting is at the top of the Color Map Editor. See more info in the docs:

[https://docs.paraview.org/en/latest/ReferenceManual/colorMapping.html?highlight=color%20scale#mapping-data](https://docs.paraview.org/en/latest/ReferenceManual/colorMapping.html?highlight=color%20scale#mapping-data)

---

<div class="post-metadata">

### Author: ![Rojj](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rojj/32/1409_2.png) [@Rojj](https://discourse.paraview.org/u/Rojj)
#### Post date: [May 8, 2021, 5:24am UTC](https://discourse.paraview.org/t/colormaps-with-fixed-mapping-between-scalar-and-rgb/7153/3 "2021-05-08T05:24:55Z")

</div>

`Automatic Rescale Range Mode` is already set to `never`. However, if I rescale to data range it changes to `Grow and update on 'Apply'`. Not sure whether this is the expected behavior.

From the docs it seems that the default behavior should be modifiable from the Settings, but the option `Never` is not there.

I have also tried setting the transfer function update from the script with `AutomaticRescaleRangeMode = "Never"` and the results is the same.
