Changes the RGB value of a specified Color object, and updates all objects referencing that color.

 public void SetColor(Color color, int red, int green, int blue)
Public Sub SetColor(ByVal color As Color, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)

The Color object to modify. This must be a Palette color (i.e. Color.IsPaletteColor must return true).

The red component of the desired color. Must be between 0 and 255.

The green component of the desired color. Must be between 0 and 255.

The blue component of the desired color. Must be between 0 and 255.

If the given Color is not a palette color, see Color.IsPaletteColor

If the given red, green, or blue value does not fall between 0 and 255.

Any objects that reference this color object will be updated to use the new RGB values. For .xlsx files, this alters the legacy palette, which is used when opening the file in Excel 2003, but still updates objects referencing the given palette color.

palette.SetColor(clr, 162, 221, 138);
palette.SetColor(clr, 162, 221, 138)