Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

The Palette class represents Excel's

...

color

...

palette.

...

Signature
C#
C#
 public sealed class Palette
{signature}{signature:
}
Signature
vb.net
vb.net
Public NotInheritable Class Palette
{signature}
{remarks}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|Workbook.Palette].

{remarks}
{example}{code:csharp|title=C#}
Remarks

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.

Example
Code Block
csharp
csharp
titleC#


          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Palette pal = wb.Palette;
        
{code} {code:vbnet|title=
Code Block
vbnet
vbnet
titlevb.net
}


          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim pal As Palette = wb.Palette
        
{code} {example} {fields} ||Name||Description|| |[MinColorIndex|Palette.MinColorIndex]|{excerpt-include:Palette.MinColorIndex|nopanel=true}| |[MinRGBValue|Palette.MinRGBValue]|{excerpt-include:Palette.MinRGBValue|nopanel=true}| |[MaxColorIndex|Palette.MaxColorIndex]|{excerpt-include:Palette.MaxColorIndex|nopanel=true}| |[MaxRGBValue|Palette.MaxRGBValue]|{excerpt-include:Palette.MaxRGBValue|nopanel=true}| {methods} ||Name||Description|| |[GetClosestColor(Int32, Int32, Int32)|
Fields

Name

Description

MinColorIndex

Excerpt Include
Palette.MinColorIndex
Palette.MinColorIndex
nopaneltrue

MinRGBValue

Excerpt Include
Palette.MinRGBValue
Palette.MinRGBValue
nopaneltrue

MaxColorIndex

Excerpt Include
Palette.MaxColorIndex
Palette.MaxColorIndex
nopaneltrue

MaxRGBValue

Excerpt Include
Palette.MaxRGBValue
Palette.MaxRGBValue
nopaneltrue
Methods

Name

Description

GetClosestColor(Int32, Int32, Int32)

Excerpt Include
Palette.GetClosestColor(Int32,

...

Int32,

...

Int32)

...

Palette.GetClosestColor(Int32,

...

Int32,

...

Int32)

...

nopanel

...

...

Excerpt Include
Palette.GetClosestColor(System.Drawing.Color)

...

Palette.GetClosestColor(System.Drawing.Color)

...

nopanel

...

...

...

...

Excerpt Include
Palette.GetColor(Int32,

...

Int32,

...

Int32)

...

Palette.GetColor(Int32,

...

Int32,

...

Int32)

...

nopanel

...

...

Excerpt Include
Palette.GetColor(System.Drawing.Color)

...

Palette.GetColor(System.Drawing.Color)

...

nopanel

...

...

Excerpt Include
Palette.GetColorAt(Int32)

...

Palette.GetColorAt(Int32)

...

nopanel

...

...

...

...

...

Excerpt Include
Palette.SetColor(Color,

...

Int32,

...

Int32,

...

Int32)

...

Palette.SetColor(Color,

...

Int32,

...

Int32,

...

Int32)

...

nopanel

...

...

...

...

...

Excerpt Include
Palette.SetColorAt(Int32,

...

Int32,

...

Int32,

...

Int32)

...

Palette.SetColorAt(Int32,

...

Int32,

...

Int32,

...

Int32)

...

nopanel

...

true
Classes

Name

Description

SystemColor

Excerpt Include
Palette.SystemColor
Palette.SystemColor
nopaneltrue