title: Generate Color Gradient in C#
body: <p>My question here is similar to <a href="https://stackoverflow.com/questions/1283391/generating-color-gradients">the question here</a>, except that I am working with C#.</p>
  <p>I have two colors, and I have a predefine steps. How to retrieve a list of <code>Color</code>s that are the gradients between the two?</p>
  <p>This is an approach that I tried, which didn't work:</p>
  <pre><code>int argbMax = Color.Chocolate.ToArgb();
  int argbMin = Color.Blue.ToArgb();
  var colorList = new List&lt;Color&gt;();
  
  for(int i=0; i&lt;size; i++)
  {
      var colorAverage= argbMin + (int)((argbMax - argbMin) *i/size);
      colorList.Add(Color.FromArgb(colorAverage));
  }
  </code></pre>
  <p>If you try the above code, you will find that a gradual increase in <code>argb</code> doesn't correspond to a visual gradual increase in the color.</p>
  <p>Any idea on this?</p>