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
Wiki Markup
{description}
{excerpt}The [Palette|Palette] class represents Excel's color palette. {excerpt}
{signature:C#}
 public sealed class Palette
{signature}{signature: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#}

          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Palette pal = wb.Palette;
        {code}
{code:vbnet|title=vb.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)|Palette.GetClosestColor(Int32, Int32, Int32)]|{excerpt-include:Palette.GetClosestColor(Int32, Int32, Int32)|nopanel=true}|
|[GetClosestColor(System.Drawing.Color)|Palette.GetClosestColor(System.Drawing.Color)]|{excerpt-include:Palette.GetClosestColor(System.Drawing.Color)|nopanel=true}|
|[GetColor(Int32, Int32, Int32)|Palette.GetColor(Int32, Int32, Int32)]|{excerpt-include:Palette.GetColor(Int32, Int32, Int32)|nopanel=true}|
|[GetColor(System.Drawing.Color)|Palette.GetColor(System.Drawing.Color)]|{excerpt-include:Palette.GetColor(System.Drawing.Color)|nopanel=true}|
|[GetColorAt(Int32)|Palette.GetColorAt(Int32)]|{excerpt-include:Palette.GetColorAt(Int32)|nopanel=true}|
|[SetColor(Color, Int32, Int32, Int32)|Palette.SetColor(Color, Int32, Int32, Int32)]|{excerpt-include:Palette.SetColor(Color, Int32, Int32, Int32)|nopanel=true}|
|[SetColorAt(Int32, Int32, Int32, Int32)|Palette.SetColorAt(Int32, Int32, Int32, Int32)]|{excerpt-include:Palette.SetColorAt(Int32, Int32, Int32, Int32)|nopanel=true}|
{classes}
||Name||Description||
|[SystemColor|Palette.SystemColor]|{excerpt-include:Palette.SystemColor|nopanel=true}|