Dynamic background-color on td, based on text value
<p>I am trying to create a dynamic background color in a certain range on a td. This color has to be based on the value that is inside the td.</p>

<p>For example:</p>

<pre><code>&lt;tr&gt;
&lt;td&gt;40%&lt;/td&gt;
&lt;td&gt;70%&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Let's say the 0% color is: #ff0000 and the 100% color is: #00ff00</p>

<p>For the table cell containing the value of 40% I'd like the background color to be 40% of the range that is inbetween #ff0000 and #00ff00.</p>

<p>This way all the cells will have a custom background color based on the text value they contain.</p>

<p>Any clues?</p>
