Gradiant coloring

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Hey all!

I need to color from blue to red in sort of a gradient depending on a value.

For example: lets say 1 is blue and red is 100. I need to change from blue
to red depending on the value so 50 would be a color in between blue and red
and 25 would be more blue than red.

Does anyone have an algorithm to do this?

Thanks.
Joe
 
Hey all!

I need to color from blue to red in sort of a gradient depending on a value.

For example: lets say 1 is blue and red is 100. I need to change from blue
to red depending on the value so 50 would be a color in between blue and red
and 25 would be more blue than red.

Does anyone have an algorithm to do this?

Thanks.
Joe

Can't you just use the GradientBrush in the System.Drawing namespace?

Thanks,

Seth Rowe
 
Back
Top