Hey, I have a dataset that is uneven about zero, I want to use a diverging color map. Is there a way I can set my zero velocity to be at the center of the color map? I have several datasets and timesteps so I would prefer a solution that is not too complicated.
I know I can custom set the range to something like -15 to 15 and I would get what I want, but that will make it harder to read maxia/minima.
In order to read the min/max from the colorscale, it should not be symmetric. Min/max should be kept as they are, but the center color of the scale should be at zero. Like this:

That’s right, Venke. This is exactly how I want it, unfortunately, seems like there is no other solution apart from making a new colour scheme and importing the .xml file.
I can’t see an easy way either. This is related to a feature request from 3 years ago “Improvements to colormaps / color ranges”, especially one of the answers by David Thompson. Maybe a new feature request or jumping in on the old one could bring new attention to this topic.
Hi there @Buggs_Bunny
There is usually more than one way to skin a cat.
Another solution could be crafting your own colormap. Paraview can import custom colorbars, in json format. Of course it works the other way around, so you can also export existing ones to inspect and understand.
As a demonstrative example, to that aim, I have exported a standard in-built “FAST” colormap in json format:
[
{
"ColorSpace" : "Lab",
"Creator" : "Francesca Samsel, and Alan W. Scott",
"DefaultMap" : true,
"Name" : "Fast",
"NanColor" :
[
0.0,
1.0,
0.0
],
"RGBPoints" :
[
0,
0.056399999999999992,
0.056399999999999992,
0.46999999999999997,
0.17159223942480895,
0.24300000000000013,
0.46035000000000043,
0.81000000000000005,
0.29849148183941382,
0.35681438265435211,
0.74502464853631423,
0.95436770289372197,
0.43212873712559069,
0.68820000000000003,
0.93000000000000005,
0.91790999999999989,
0.5,
0.89949595512059022,
0.944646394975174,
0.7686567142818399,
0.58822603531700735,
0.957107977357604,
0.83381851089856662,
0.50891562998421025,
0.70614126056951643,
0.92752075996107142,
0.62143890917391775,
0.31535705838676426,
0.84763953087252719,
0.80000000000000004,
0.35200000000000009,
0.15999999999999998,
1,
0.58999999999999997,
0.076700000000000129,
0.11947499999999994
]
}
]
Once you have understood the logic and its architecture, you can create your own, name it, and import it. You can find import and export functionality (button) in the colormap GUI panel selector.
The architecture calls for a flat sequence of scalar value + RBG triplets:
| Scalar value | R | G | B |
| ------------ | -------- | -------- | -------- |
| 0.000000 | 0.0564 | 0.0564 | 0.4700 |
| 0.171592 | 0.2430 | 0.46035 | 0.8100 |
| 0.298491 | 0.356814 | 0.745025 | 0.954368 |
| 0.432129 | 0.6882 | 0.93 | 0.91791 |
| 0.500000 | 0.899496 | 0.944646 | 0.768657 |
| 0.588226 | 0.957108 | 0.833819 | 0.508916 |
| 0.706141 | 0.927521 | 0.621439 | 0.315357 |
| 0.847640 | 0.8000 | 0.3520 | 0.1600 |
| 1.000000 | 0.5900 | 0.0767 | 0.119475 |
The colormap json file goes attached to this message.
Hope this helps.
test_colormap_export.json (1011 Bytes)
When dealing with a lot of datasets it is not practical to create a new colormap for each of them as the min/max values change (and thus the distances from zero to the most positive and most negative values). I guess it would be possible to create a python script performing this automatically but a checkbox for the option to fix the zero color (white in the examples above) to zero and let the blues and reds interpolate to the min/max from there would be most convenient.



