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 a 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)
{signature}{signature:
}
Signature
vb.net
vb.net
Public Function GetColor(ByVal color As System.Drawing.Color) As Color
{signature}
{parameters}
{param:color}The desired color.{param}
{returns}A {msdn:
Parameters
Param
color
color

The desired color.

Returns

A

Msdn
System.Drawing.Color

|Color} object in the palette that matches the specified color.{returns} {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. {remarks} {example}{code:csharp|title=C#}

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} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}

Dim clr As Color = pal.GetColor(System.Drawing.Color.Red)
{code} {example}