How to set color of text using xlwt
python, xlrd, xlwt
Solution
This is what worked:
style = xlwt.easyxf('pattern: pattern solid, fore_colour light_blue;'
'font: colour white, bold True;')
Problem
I haven't been able to find documentation on how to set the color of text. How would the following be done in xlwt? ``` style = xlwt.XFStyle() # bold font = xlwt.Font() font.bold = True style.font = font # background color pattern = xlwt.Pattern() pattern.pattern = xlwt.Pattern.SOLID_PATTERN pattern.pattern_fore_colour = xlwt.Style.colour_map['pale_blue'] style.pattern = pattern # color of text ??? ``` Another way I have tried, where I've been able to set the font color but not the background color is: ``` style = xlwt.easyxf('font: bold 1, color red;') ```