• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3028
  • Last Modified:

How to determine RGB values for default colors in Excel 2007 column chart

I created a column chart letting Excel automatically choose the column colors.  I like the colors, but would like to change the order of the colors in the chart.  I can't find a way to determine the RGB values for these automatic colors so that I can manually change them.  When I try to look up the RGB values for a data series the column color is changed to blue.  Here's the procedure I use to try to look up the RGB values: Right click on the data series in the chart, select format data series, select fill, then choose solid fill.  At this point the color is automatically changed to blue.  If the color hadn't changed to blue, the next steps I would have chosen would be: click on the drop down arrow for the color palette, select more colors, and then write down the RGB values so that I could change a different series to that color.  Any help in finding a list of default colors and associated RGB values or a way to determine the values in Excel 2007 would be appreciated.
0
marknlynn3
Asked:
marknlynn3
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello makrnlyn,

select the data series, open the format dialog, change the Fill color from Automatic to Solid Fill, then click the color drop-down arrow and select More colors. On the Custom tab of the Colors dialog you can read the RGB values.

cheers, teylyn
0
 
cyberkiwiCommented:
Hi,

If you are comfortable with VBA, this will give you the RGB colors.
You can also tweak it to set the color instead of just getting it.
Sub x()
Dim c As ChartObject
Dim sc As SeriesCollection
Dim s As Series
Dim i As Long
Dim RGBColor As Long
Dim Red As Long, Green As Long, Blue As Long

Set c = ActiveSheet.ChartObjects(1)

For Each s In c.Chart.SeriesCollection
    RGBColor = s.Format.Fill.ForeColor
    Red = &HFF& And RGBColor
    Green = (&HFF00& And RGBColor) \ 256
    Blue = (&HFF0000 And RGBColor) \ 65536

    MsgBox Red & "/" & Green & "/" & Blue
Next
End Sub

Open in new window

0
 
marknlynn3Author Commented:
Thanks cyberkiwi.  Love the solution and your username.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now