title: Continuous color scale from discrete domain of strings?
body: <p>I'm implementing a heatmap in which the cell background color is determined by a d3 color scale. Some of the values are categorical; their value can be of N different arbitrary string-type categories like ["6TH", "7TH", "5TH", "4TH"]. </p>
  
  <p>Given a start color d3.rgb("blue") and an end color d3.rgb("red"), how can I construct color scale that maps a discrete domain of strings into a continuous color range?</p>
  
  <p>I tried</p>
  
  <pre><code>var scale = d3.scale.ordinal()
      .domain(["6TH", "7TH", "5TH", "4TH"])
      .rangeBands( [ d3.rgb("blue"), d3.rgb("red") ] );
  </code></pre>
  
  <p>which obviously doesn't work.</p>