I have an int value that can range from -148 to 10 and I'm trying to map this value to a color in the following gradient:
- Black (-148)
- Blue
- Cyan
- Green
- Yellow
- Orange
- Red
- White (10)
Visually, my color gradient looks like this:
My first thought was to break the range (-148 to 10) down into smaller groups that correspond to these eight colors but that obviously results in multiple values translating into the same color. I'd like to make use of many more or even all the colors in this gradient but I'm not sure how to go about doing this. Can anyone offer some advice? For what it's worth, I'm working in C#/.NET so I need to translate my int into RGB values.