I am basically drawing a line representing a water flow. I want to give the user an approximation of the temperature of the water by coloring it from 100% blue to 100% red. I though; That's very simple, i'm done in 2 minuts.. Two hours later I'm looking at very advanced color system when all I need is something very simple.
I'm making a WinForm and using System.Drawing together with a Pen:
Pen Pen1 = new Pen(Color.FromArgb(0, 0, 0, 0), 2);
I was hoping to make a function with inputs (Double) from -1 to 1 with this output Color
something like
Public Color TemperatureRange(double BlueToRed)
{
Color MyColor = new Color();
byte a, r, g, b;
//Insert math function that take from -1 to 1 and
//produces and argb-output ranging from blue to red
MyColor = Color.FromArgb(a, r, g, b);
return MyColor;
}