I have a Django website that displays data in a table, most of the data is highlighted with a calculated background color to make it quickly obvious to the user. Is there a way to reduce the amount of HTML I am outputting?
Eg:
<code><td style=background-color:#5eff00>19</td>
</code>
<code><td style=background-color:#5eff00>19</td>
</code>
<td style=background-color:#5eff00>19</td>
Ideally I’d use CSS – but I would literally be creating a class for every hex color value.
Is there a better way?