The Palette class represents Excel's color palette.

 public sealed class Palette
Public NotInheritable Class Palette

Each Excel document has a single color palette that manages the colors for formatting and some drawing layer colors. A color palette contains 56 colors that may be referenced. Each of these 56 colors may be customized, but changing a color in the palette will affect all formatting that uses the referenced color. A workbook's color palette is accessible through Workbook.Palette.


          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Palette pal = wb.Palette;
        

          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim pal As Palette = wb.Palette
        

Name

Description

MinColorIndex

MinRGBValue

MaxColorIndex

MaxRGBValue

Name

Description

GetClosestColor(Int32, Int32, Int32)

GetClosestColor(System.Drawing.Color)

GetColor(Int32, Int32, Int32)

GetColor(System.Drawing.Color)

GetColorAt(Int32)

SetColor(Color, Int32, Int32, Int32)

SetColorAt(Int32, Int32, Int32, Int32)

Name

Description

SystemColor