Colors property (Excel Graph)
Returns or sets colors in the palette for a Chart object. The palette has 56 entries, each represented by an RGB value. Read/write Variant.
expression.Colors (Index)
expression Required. An expression that returns one of the objects in the Applies To list.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index | Optional | Variant | The color number (from 1 to 56). If this argument isn't specified, this method returns an array that contains all 56 of the colors in the palette. |
This example sets color five in the color palette for the active chart.
ActiveChart.Colors(5) = RGB(255, 0, 0)
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.