I am using HTML-Email with HTML Table within - Python MIME type : text/html Email with below code :
dashboardTable = """ <table>"""
indexCount = 1
for sectionIndex in range(0,len(sections_available)):
dashboardTable = dashboardTable + """
<tr>
<td align='left'>""" + str(indexCount) + """ </td>
<td align='left'>""" + sections_available[sectionIndex] + """ </td>
<td align='left'> """ + str(sections_timeTaken[sectionIndex]) + """ </td>
</tr>"""
indexCount = indexCount + 1
dashboardTable = dashboardTable + """</table>"""
I need to color Third Cell:
<td align='left'> """ + str(sections_timeTaken[sectionIndex]) + """ </td>
In a way such that, Highest sections_timeTaken value kept with "Red Color" to lowest in "Green Color". Coloring entire range of values in ordered manner from Highest to Lowsest :
Like Red -> Light red -> Lightesr Red -> Yellow - > Green eventually.[ Not mentioning exact shade]
The total number of Values to be plotted inside table will remain dynamic.
I am using Python HTML table within Email.