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

Returns the color in the palette identical to the specified color. An exception will be thrown if the color is not in the palettea Color representing the specified color, and throws an exception if the file does not support the specified color.

Signature
C#
C#
 public Color GetColor(System.Drawing.Color color)

...

Returns

A

Msdn
System.Drawing.Color
System.Drawing.Color
1Color
object in the palette that matches the specified color.

Remarks

For .xls files, an exception will be thrown if the color is not in the palette. For .xlsx files, a Color will always be returned.

Example
Code Block
csharp
csharp
titleC#
Color clr = pal.GetColor(System.Drawing.Color.Red);
Code Block
vb.net
vb.net
titlevb.net
Dim clr As Color = pal.GetColor(System.Drawing.Color.Red)