Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
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#
Wiki Markup
{description}
{excerpt}Returns a [Color] representing the specified color, and throws an exception if the file does not support the specified color.{excerpt}
{signature: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
Parameters
{signature}
{parameters}
{param:color}The desired color.{param}
{returns}A {msdn:System.Drawing.Color
object in the palette that matches the specified color.
Param
colorcolor

The desired color.

Returns
A
Msdn
System.Drawing.Color
1Color
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.

|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#}
Color clr = pal.GetColor(System.Drawing.Color.Red);
{code}
{code:vb.net
|title=vb.net
}
Dim clr As Color = pal.GetColor(System.Drawing.Color.Red){code}

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle