from xlwt import easyxf
style = easyxf('pattern: pattern solid, fore_colour light_green')
The full list is only currently available in easyxf.py in the xlwt
distribution.
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
Hi Nils,
> where can I find a table that connects
>
> badBG2.pattern_fore_colour = 0x22 with the corresponding color ?
Using easyxf (see the docs, and then as the docs say, "Refer to the
examples in the file .../examples/xlwt_easyxf_simple_demo.py and to the
xf_dict dictionary in Style.py") is much better than the old
poking-values-into-attributes way.
There is a mapping from colour names to colour indexes in Style.py. Note
that the names are what Excel 2003 calls them. There is very little
correspondence with the web (CSS etc) colours that you may be used to;
there are many RGB values that are in one mapping and not the other;
sometimes the names given to a common RGB value differ widely/weirdly.
Looking at the info on colours and the palette in the xlrd docs might be
useful.
>
> e.g.
>
> 0x22 : yellow
> 0x35 : orange
> 0xa : red
> ...
>
> I am looking for light green.
HTH,
John