# Color Map Classification Problem

**URL:** https://discourse.paraview.org/t/color-map-classification-problem/15362
**Category:** ParaView Support
**Created:** [September 9, 2024, 10:50am UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362 "2024-09-09T10:50:28Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![rmdmagalong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rmdmagalong](https://discourse.paraview.org/u/rmdmagalong)
#### Post date: [September 9, 2024, 10:50am UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/1 "2024-09-09T10:50:28Z")

</div>

![image](https://discourse.paraview.org/uploads/default/original/2X/7/775414694e18ebd08b85713d77aa04e1a521f91e.png)

I have been trying to figure out how to assign a specific range of numbers for each color but to no avail. What I want is for there would be a distinct color to represent each range/group of numbers. For example, all values less than 10 will be displayed as blue, 10-50 as green, 50-100 as yellow, and beyond 100 as red. I would really appreciate your help regarding this! Thanks!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 9, 2024, 11:05am UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/2 "2024-09-09T11:05:23Z")

</div>

Please share your data

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 9, 2024, 12:01pm UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/3 "2024-09-09T12:01:03Z")

</div>

Hi @rmdmagalong , welcome to the ParaView community!

This is a tricky request with how ParaView maps data to colors. Typically, you specify your overall data range and then the color map separately, and the data values are mapped linearly into the that data range to determine the colormap. You would need to define the data range and color map in such a way that the values between colors in the map fall on the data threshold values where you want to change color. In general, that’s tough to do with ParaView

With these specific data ranges, however, you could set the overall data range to [10,100]. Then your color map should be defined with the **Number of Table Values** set to 9 colors. Add two control points at 50 (set to green) and 50.000001 (set to yellow). Now, check the **Use Below Range Color** option and click to set that color to blue and check the **Use Above Range Color** option and click to set that color to red. This should give you the color mapping you are looking for. The UI should look like

 ![image](https://discourse.paraview.org/uploads/default/original/2X/8/80aaf25bf1fc212e02f098a42a3596b2a545da32.png)

continued

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

This yields with some test data

 ![image](https://discourse.paraview.org/uploads/default/original/2X/8/880f7cd0bbd0b8d89ece4ff8f4aab473a09cdfb4.png)

In the general case where it is not easy to figure out how to create a color map that happens to change colors at your preferred data thresholds, I would use a **Python Calculator** or **Programmable Filter** to classify a data point as being in one of a number of categories represented by an integer. You can then use the **Interpret Values as Categories** option to map these categories directly to colors.

---

<div class="post-metadata">

### Author: ![rmdmagalong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rmdmagalong](https://discourse.paraview.org/u/rmdmagalong)
#### Post date: [September 9, 2024, 12:33pm UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/4 "2024-09-09T12:33:13Z")

</div>

Hi Mathieu,

Unfortunately, the file keeps on failing to upload. What’s your email? I can send it to you via email.

Regards,  
Raymond

---

<div class="post-metadata">

### Author: ![rmdmagalong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rmdmagalong](https://discourse.paraview.org/u/rmdmagalong)
#### Post date: [September 9, 2024, 12:35pm UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/5 "2024-09-09T12:35:21Z")

</div>

Hi Cory,

Thanks for replying. I will try this out. Much appreciated!

Regards,  
Raymond

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 9, 2024, 12:39pm UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/6 "2024-09-09T12:39:13Z")

</div>

You can use [https://wetransfer.com/](https://wetransfer.com/)

---

<div class="post-metadata">

### Author: ![rmdmagalong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rmdmagalong](https://discourse.paraview.org/u/rmdmagalong)
#### Post date: [September 9, 2024, 3:09pm UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/7 "2024-09-09T15:09:57Z")

</div>

Hi Mathieu,

Thanks for letting me know about WeTransfer. I just learned about it now. Here’s the link: [Unique Download Link | WeTransfer](https://we.tl/t-VNXEVW4fjj) thanks!

Regards,  
Raymond

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 10, 2024, 7:28am UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/8 "2024-09-10T07:28:05Z")

</div>

Here you go:

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

Here is the state file:

[state.pvsm](https://discourse.paraview.org/uploads/short-url/fTLFvWiQf6btiQA32QNy4RZBIzq.pvsm) (219.7 KB)

I used “above” color as suggested by @cory.quammen as well as a manually created step color map.

---

<div class="post-metadata">

### Author: ![rmdmagalong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rmdmagalong](https://discourse.paraview.org/u/rmdmagalong)
#### Post date: [September 10, 2024, 10:31am UTC](https://discourse.paraview.org/t/color-map-classification-problem/15362/9 "2024-09-10T10:31:41Z")

</div>

Thank you @cory.quammen and @mwestphal ! I am going to study how to replicate this. Thanks!

Regards,  
Raymond
