Page tree
Skip to end of metadata
Go to start of metadata

Description

Replaces the color at the specified index in the palette with a new color.

C#
vb.net

Parameters

index
The 0-based index of the color to modify. Must be between 0 and 55.
red
The red component of the desired color. Must be between 0 and 255.
green
The green component of the desired color. Must be between 0 and 255.
blue
The blue component of the desired color. Must be between 0 and 255.

Returns

A Color object representing the new color at the specified index in the palette.

Exceptions

System.ArgumentOutOfRangeException
If the given red, green, or blue value is not between 0 and 255.

Remarks

Any objects that reference this palette color will be updated to use the new RGB values instead. For .xlsx files, this will modify the legacy palette, which is used when opening the file in Excel 2003.

Examples

C#
vb.net
  • No labels