Like user1813558 in his question "Change the pie chart colors" I would like to choose the colors that Excel uses for a pie chart (indeed for any chart) as I need them to be consistent with other data visualizations we have carefully produced so that a color-blind team mate can still join in data trawl sessions. But rather than write code I would like to do it in the Excel sheet. Is there any way I can put the color data down in the Excel worksheet, for example as a column of RGB hex strings like 7DFF7D, and point the chart at that column for its color choice?
What you would like to do is not possible without code.
The following VBA function can be used to set colors based on cell values for a pie chart in the active worksheet. The color values can be in an N rows x 3 columns range of decimal RGB values or an N rows x 1 column range of 6 digit hex values (where the hex number is a set of three 2-digit hex values in RGB order).
The function requires two arguments: a reference to the range of color values (A1:A5, for example) and the name of the pie chart. The chart name can either be a default name (such as "Chart 2") or a name given to the chart.
If the number of columns in the input range does not equal 3 or 1, or the number of rows does not equal the number of data points in the pie chart, the function returns #N/A! error.
A recolored chart will retain the new colors after the function is deleted from the sheet.
The function can be installed by copying it into a new module inserted via the Developer / Visual Basic menu accessed from the Excel ribbon.