list of colors

9,835 views
Skip to first unread message

programando_en_montreal

unread,
Jan 19, 2011, 4:27:50 PM1/19/11
to python-excel
Hello, I would like to know whether there are more than 50 different
colors to use as fore-colour in excel using xlwt

The ones I have are listed below.

Thanks!

# aqua 0x31
# black 0x08
# blue 0x0C
# blue_gray 0x36
# bright_green 0x0B
# brown 0x3C
# coral 0x1D
# cyan_ega 0x0F
# dark_blue 0x12
# dark_blue_ega 0x12
# dark_green 0x3A
# dark_green_ega 0x11
# dark_purple 0x1C
# dark_red 0x10
# dark_red_ega 0x10
# dark_teal 0x38
# dark_yellow 0x13
# gold 0x33
# gray_ega 0x17
# gray25 0x16
# gray40 0x37
# gray50 0x17
# gray80 0x3F
# green 0x11
# ice_blue 0x1F
# indigo 0x3E
# ivory 0x1A
# lavender 0x2E
# light_blue 0x30
# light_green 0x2A
# light_orange 0x34
# light_turquoise 0x29
# light_yellow 0x2B
# lime 0x32
# magenta_ega 0x0E
# ocean_blue 0x1E
# olive_ega 0x13
# olive_green 0x3B
# orange 0x35
# pale_blue 0x2C
# periwinkle 0x18
# pink 0x0E
# plum 0x3D
# purple_ega 0x14
# red 0x0A
# rose 0x2D
# sea_green 0x39
# silver_ega 0x16
# sky_blue 0x28
# tan 0x2F
# teal 0x15
# teal_ega 0x15
# turquoise 0x0F
# violet 0x14
# white 0x09
# yellow 0x0D

John Machin

unread,
Jan 19, 2011, 7:30:16 PM1/19/11
to python...@googlegroups.com
On Thu, January 20, 2011 8:27 am, programando_en_montreal wrote:
> Hello, I would like to know whether there are more than 50 different
> colors to use as fore-colour in excel using xlwt
>
> The ones I have are listed below.
>
> Thanks!
>
> # aqua 0x31
[snip]
> # yellow 0x0D

Sorry, I don't understand your question. You appear to have listed out all
the (colour_name, colour_index) pairs in the colour_map used by
xlwt.easyxf (for fore_colour and every_other_colour). There are 56 of
them. However some names map to the same index.

If you haven't already done so, please read the section entitled "The
Palette; Colour Indexes" in the xlrd docs
(https://secure.simplistix.co.uk/svn/xlrd/trunk/xlrd/doc/xlrd.html)

256 ** 3 (16.7 million) different colours are possible, but an XLS file
limits you to one palette of 64 colours. Of those, 8 are fixed, leaving 56
variable.

Currently, xlwt has no API to specify a non-default palette.

If the above remarks don't cover what you are interested in, please feel
free to ask again ... saying what you are trying to do might help.

Cheers,
John


Reply all
Reply to author
Forward
0 new messages