Chart axes color index vs font color index

  • Thread starter dennis.benjamin
  • Start date
D

dennis.benjamin

Hi All

quick question here regarding color indexes. Our company approved
Powerpoint style has a dark background, so when we paste Excel charts
we need to change all the black elements to white. I thought it would
be faster to just change black to white in the "tools .. options..
colors" tab. When I do that, all the lines on our charts turn white but
everything else (axes, legend, title) stays black, even though the
color for all elements is set to automatic. So, do these elements use a
different color table, or does automatic not assign the same color to
all the elements, or what? I have written a VBA macro to individually
change the elements, but it's not so elegant, and I'd like to
understand why my first attempt didn't work.

Thanks for any help!

D
 
J

Jon Peltier

Each element has a default (automatic) colorindex which is independent from
all the others.

- Jon
 
D

dennis.benjamin

Thanks for your reply, Jon. I'm still not clear, though - I thought
that Excel had a 56 color map, and when I look at the map under the
Tools...option tab, only one of those colors is black. So if all the
elements are black, how can they have different color indexes? I
understand that they can all be set independently, but if all the
elements are black then must they not all have the same color index?
Either that or they use separate color maps, in which case, how can I
see and edit the various colormaps used in Excel?

Thanks for your help, and incidentally I've learned a great deal from
your Website examples, they are very well done.

D
 
A

Andy Pope

Hi,

The items that are remaining black probably have a colorindex of -4105
which is the xlColorIndexAutomatic.
You would have to set the colour of the chart elements to Black, or
colorindex 1.

Not sure how or if you can change the automatic colours.

Cheers
Andy
 
J

Jon Peltier

I shouldn't have mixed up Automatic with Default. By default the plot area
has an interior color index of 15 and border color index of 16. As far as I
know you cannot change the default colorindex values, but you can change the
colors corresponding to color indices 15 and 16. For several other chart
elements (legend, chart area) fill and border both have color index
of -4105, as Andy pointed out. Series also use this default value for marker
foreground and background color indices.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top