Working with Colors#
Throughout XlsxWriter colors are specified using a Html style #RRGGBB
value. For example with a Format object:
cell_format.set_font_color('#FF0000')
For backward compatibility a limited number of color names are supported:
cell_format.set_font_color('red')
The color names and corresponding #RRGGBB
value are shown below:
Color name |
RGB color code |
---|---|
black |
|
blue |
|
brown |
|
cyan |
|
gray |
|
green |
|
lime |
|
magenta |
|
navy |
|
orange |
|
pink |
|
purple |
|
red |
|
silver |
|
white |
|
yellow |
|