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.
For example:
<tr>
<td>40%</td>
<td>70%</td>
<td>30%</td>
</tr>
Let's say the 0% color is: #ff0000 and the 100% color is: #00ff00
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.
This way all the cells will have a custom background color based on the text value they contain.
Any clues?