workbook = writer.book
worksheet = writer.sheets[sheet_name]
worksheet.conditional_format('B2:B8', {'type': '3_color_scale'})
writer.save()
Easiest way to create a color gradient on excel using python/pandas?