I\'d like to have an enumeration of Colors based on the rainbow colors (red... yellow... green... blue...).
I see basically two ways to do that:
Cre
In winforms(or anything using GDI+) you could use System.Drawing.Drawing2D.LinearGradientBrush to do the interpolation for you.
WPF's System.Windows.Media.GradientBrush could work as well. It's abstract so you might end up with WPF's LinearGradientBrush. It's in a different namespace than the other.
EDIT: since the question was edited to indicate that you want to be tech independent I don't think this answer applies. I'm going to leave it here for now in case someone is looking for Gradients in C#, but if someone finds that objectionable I'll remove the answer.
I did a quick check to see if you could at least get at some of the functionality in a more independent way (such as getting an array of Point or something). Doesn't appear to be the case.