title: Change Div class depending on value with small increments
body: <p>I'm trying to create a Div that can have about 100 different shades depending on the value of a variable which in this case is "votes". The more upvotes the redder the button. The more downvotes the bluer the button.</p>
  
  <p>I can easily make a function like this with 8 classes :</p>
  
  <pre><code>$scope.divColor = function (votes) {
      if (votes &lt; 60)
          return "blue60";
      else if (votes &gt;= 60 &amp;&amp; votes &lt;= 69)
          return "blue70";
      else if (votes &gt;= 70 &amp;&amp; votes &lt;= 79)
          return "blue80";
      else if (votes &gt;= 80 &amp;&amp; votes &lt;= 89)
          return "blue90";
      else if (votes &gt;= 90 &amp;&amp; votes &lt;= 99)
          return "red100";
      else if (votes &gt;= 100 &amp;&amp; votes &lt;= 109)
          return "red110";
      else if (votes &gt;= 110 &amp;&amp; votes &lt;= 119)
          return "red120";
      else if (votes &gt;= 120)
          return "red130";
  }
  </code></pre>
  
  <p>But is there anyway to have a variable somewhere that uses the votes value to set the actual background-color rather than the class?</p>